http://qs1969.pair.com?node_id=1193462

Why learn a whole new language for templating when you already know a perfectly good one? This isn't the first module that allows you to embed Perl in your templates, but it's yet another one.

use Types::Standard -types; use Template::Compiled; my $template = Template::Compiled->new( signature => [ name => Str, age => Int->plus_coercions(Num, sub { int $_ } ), ], template => '<p>Hi <?= $name ?>. You are <?= $age ?> years old.</p +>', escape => 'html', ); # The number will be rounded. # The ampersand will be escaped properly. # print $template->( name => 'Alice & Bob', age => 45.1 );

Template::Compiled on MetaCPAN.