• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Text/H17-Dec-2019-1,204714

t/H17-Dec-2019-1,4311,195

ChangesH A D17-Dec-20192.5 KiB8258

LICENSEH A D17-Dec-201917.9 KiB380292

MANIFESTH A D17-Dec-2019556 2827

META.jsonH A D17-Dec-20191.6 KiB6462

META.ymlH A D17-Dec-2019857 3332

Makefile.PLH A D17-Dec-20191.5 KiB6251

READMEH A D17-Dec-2019424 167

README.podH A D17-Dec-20192.2 KiB8151

dist.iniH A D17-Dec-20191.1 KiB5848

README

1
2
3This archive contains the distribution Text-Hogan,
4version 2.03:
5
6  Text::Hogan - A mustache templating engine statement-for-statement cloned from hogan.js
7
8This software is copyright (c) 2019 by Alex Balhatchet.
9
10This is free software; you can redistribute it and/or modify it under
11the same terms as the Perl 5 programming language system itself.
12
13
14This README file was generated by Dist::Zilla::Plugin::Readme v6.008.
15
16

README.pod

1=pod
2
3=head1 NAME
4
5Text::Hogan - A mustache templating engine statement-for-statement cloned from hogan.js
6
7=head1 DESCRIPTION
8
9Text::Hogan is a statement-for-statement rewrite of
10L<hogan.js|http://twitter.github.io/hogan.js/> in Perl.
11
12It is a L<mustache|https://mustache.github.io/> templating engine which
13supports pre-compilation of your templates into pure Perl code, which then
14renders very quickly.
15
16It passes the full L<mustache spec|https://github.com/mustache/spec>.
17
18=head1 SYNOPSIS
19
20    use Text::Hogan::Compiler;
21
22    my $text = "Hello, {{name}}!";
23
24    my $compiler = Text::Hogan::Compiler->new;
25    my $template = $compiler->compile($text);
26
27    say $template->render({ name => "Alex" });
28
29See L<Text::Hogan::Compiler|Text::Hogan::Compiler> and
30L<Text::Hogan::Template|Text::Hogan::Template> for more details.
31
32=head1 TEMPLATE FORMAT
33
34The template format is documented in
35L<mustache(5)|https://mustache.github.io/mustache.5.html>.
36
37=head1 SEE ALSO
38
39=head2 hogan.js
40
41L<hogan.js|http://twitter.github.io/hogan.js/> is the original library that
42Text::Hogan is based on. It was written and is maintained by Twitter. It runs
43on Node.js and pre-compiles templates to pure JavaScript.
44
45=head2 Text::Caml
46
47L<Text::Caml|Text::Caml> supports searching for partials by file name, by
48default .caml but that can be configured.
49
50=head2 Template::Mustache
51
52L<Template::Mustache|Template::Mustache> is used by Dancer::Template::Mustache
53and Dancer2::Template::Mustache. It supports compile once, render many times,
54but does not allow dumping the compiled form to disk.
55
56=head2 Mustache::Simple
57
58L<Mustache::Simple|Mustache::Simple> largely supports the Mustache spec, but
59skips the whitespace and decimal tests (its behaviour with decimals is the same
60as Text::Hogan with 'numeric_string_as_string' option enabled.) It supports
61passing objects with getters to the context hash, so that {{name}} can be
62rendered from $object->name if $object->can('name') returns true.
63
64=head1 AUTHORS
65
66Started out statement-for-statement copied from hogan.js by Twitter!
67
68Initial translation by Alex Balhatchet (alex@balhatchet.net)
69
70Further improvements from:
71
72Ed Freyfogle
73Mohammad S Anwar
74Ricky Morse
75Jerrad Pierce
76Tom Hukins
77Tony Finch
78Yanick Champoux
79
80=cut
81