Text::Hogan::Template(3pm)

Text::Hogan::Template3pm

Represent and render compiled templates

Usage

Use Text::Hogan::Compiler to create Template objects.

Then call render passing in a hashref for context.

    use Text::Hogan::Compiler;
    my $template = Text::Hogan::Compiler->new->compile("Hello, {{name}}!");
    say $template->render({ name => $_ }) for (qw(Fred Wilma Barney Betty));

Optionally takes a hashref of partials.

    use Text::Hogan::Compiler;
    my $template = Text::Hogan::Compiler->new->compile("{{>hello}}");
    say $template->render({ name => "Dino" }, { hello => "Hello, {{name}}!" });

Version

version 2.03

Releases

5 releases since Debian 9 (Stretch); the text changed 3 times.

  1. 9
  2. 10
  3. 11
  4. 12–13

Authors

Started out statement-for-statement copied from hogan.js by Twitter!

Initial translation by Alex Balhatchet ([email protected])

Further improvements from:

Ed Freyfogle Mohammad S Anwar Ricky Morse Jerrad Pierce Tom Hukins Tony Finch Yanick Champoux

From libtext-hogan-perl 2.03-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.