Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Text::Hogan::Template(User Contributed Perl DocumentatText::Hogan::Template(3)

NAME
       Text::Hogan::Template - represent and render compiled templates

VERSION
       version 2.03

SYNOPSIS
       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}}!" });

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

       Initial translation by Alex Balhatchet (alex@balhatchet.net)

       Further improvements from:

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

perl v5.32.1			  2019-12-17	      Text::Hogan::Template(3)

NAME | VERSION | SYNOPSIS | AUTHORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Text::Hogan::Template&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help