Template::Alloy

Template::Alloy is a TT2/3, HT, HTE, Tmpl, and Velocity Engine.
Download

Template::Alloy Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Paul Seamons
  • Publisher web site:
  • http://search.cpan.org/~rhandom/

Template::Alloy Tags


Template::Alloy Description

Template::Alloy is a TT2/3, HT, HTE, Tmpl, and Velocity Engine. Template::Alloy is a TT2/3, HT, HTE, Tmpl, and Velocity Engine.SYNOPSISTemplate::Toolkit style usage my $t = Template::Alloy->new( INCLUDE_PATH => , ); my $swap = { key1 => 'val1', key2 => 'val2', code => sub { 42 }, hash => {a => 'b'}, }; # print to STDOUT $t->process('my/template.tt', $swap) || die $t->error; # process into a variable my $out = ''; $t->process('my/template.tt', $swap, $out); ### Alloy uses the same syntax and configuration as Template::ToolkitHTML::Template::Expr style usage my $t = Template::Alloy->new( filename => 'my/template.ht', path => , ); my $swap = { key1 => 'val1', key2 => 'val2', code => sub { 42 }, hash => {a => 'b'}, }; $t->param($swap); # print to STDOUT (errors die) $t->output(print_to => *STDOUT); # process into a variable my $out = $t->output; ### Alloy can also use the same syntax and configuration as HTML::TemplateText::Tmpl style usage my $t = Template::Alloy->new; my $swap = { key1 => 'val1', key2 => 'val2', code => sub { 42 }, hash => {a => 'b'}, }; $t->set_delimiters('##'); $t->set_strip(0); $t->set_values($swap); $t->set_dir('/path/to/templates'); my $out = $t->parse_file('my/template.tmpl'); my $str = "Foo ## Bar"; my $out = $t->parse_string($str); ### Alloy uses the same syntax and configuration as Text::TmplVelocity (VTL) style usage my $t = Template::Alloy->new; my $swap = { key1 => 'val1', key2 => 'val2', code => sub { 42 }, hash => {a => 'b'}, }; my $out = $t->merge('my/template.vtl', $swap); my $str = "#set($foo 1 + 3) ($foo) ($bar) ($!baz)"; my $out = $t->merge($str, $swap);Requirements:· Perl Requirements: · Perl


Template::Alloy Related Software