table of contents
Text::Hogan(3pm) | User Contributed Perl Documentation | Text::Hogan(3pm) |
NAME¶
Text::Hogan - A mustache templating engine statement-for-statement cloned from hogan.jsVERSION¶
version 1.04DESCRIPTION¶
Text::Hogan is a statement-for-statement rewrite of hogan.js <http://twitter.github.io/hogan.js/> in Perl.It is a mustache <https://mustache.github.io/> templating engine which supports pre-compilation of your templates into pure Perl code, which then renders very quickly.
It passes the full mustache spec <https://github.com/mustache/spec>.
SYNOPSIS¶
use Text::Hogan::Compiler; my $text = "Hello, {{name}}!"; my $compiler = Text::Hogan::Compiler->new; my $template = $compiler->compile($text); say $template->render({ name => "Alex" });
See Text::Hogan::Compiler and Text::Hogan::Template for more details.
TEMPLATE FORMAT¶
The template format is documented in mustache(5) <https://mustache.github.io/mustache.5.html>.SEE ALSO¶
hogan.js¶
hogan.js <http://twitter.github.io/hogan.js/> is the original library that Text::Hogan is based on. It was written and is maintained by Twitter. It runs on Node.js and pre-compiles templates to pure JavaScript.Text::Caml¶
Text::Caml is a very good mustache-like templating engine, but does not support pre-compilation.Template::Mustache¶
Template::Mustache is a module written by Pieter van de Bruggen. Currently has no POD. Used by Dancer::Template::Mustache.Mustache::Simple¶
I don't know anything about Mustache::Simple. It seems to be available on search.cpan.org but not on metacpan.org which is a bad sign.AUTHOR¶
Started out statement-for-statement copied from hogan.js by Twitter!Alex Balhatchet (alex@balhatchet.net)
2018-05-05 | perl v5.26.2 |