Classic

NAME

Template::Classic - Templates with arbitrary Raku code inside them

SYNOPSIS

use Template::Classic;
my &render-list := template :($title, @items), q:to/HTML/;
        <h1><%= $title %></h1>
        <ul>
            <% for @items -> $item { %>
                <li><%= $item %></li>
            <% } %>
        </ul>
        HTML
print render-list(ļ½¢Shopping listļ½£,
                      [ļ½¢Cheeseļ½£, ļ½¢Baconļ½£]);

DESCRIPTION

Templates are strings with <% %>-delimited snippets of Raku code inside them. Embedded Raku code can use take to emit strings into the rendered template. In addition, <%= %> delimiters can be used to emit the result of evaluating an expression. This value is converted to a string by calling its .Str method and special HTML characters are escaped.

BUGS

Due to a bug in Rakudo this module compiles the template only on the first call to the template, rather than immediately when template is called. This will be fixed in a future version and must not be relied upon.

}

Raku::Pod::Render v3.7.6

A generic Pod6 Renderer with custom Pod::Blocks, FormatCodes for one or more files using templates, provides HTML and MarkDown.

Authors

  • Richard Hainsworth

License

Artistic-2.0

Dependencies

Template::MustacheCro::WebApp::Template::Repository::HashCro::WebAppURILibCurlPod::LoadTest::Deeply::RelaxedFile::Directory::TreeTest::OutputFile::TempTest::METAPrettyDumpJSON::Fast

Test Dependencies

Provides

  • ExtractPod
  • InstallAtomHighlighter
  • Pod::To::HTML2
  • Pod::To::HTML2::Mustache
  • Pod::To::MarkDown
  • ProcessedPod
  • RenderPod::Exceptions
  • RenderPod::Highlighting
  • RenderPod::Templating
  • RenderPod::Test-Templates
  • raku-pod-render-install-highlighter
  • test-templates

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.