YATT::Lite - Template with "use strict"
# Minimum case: use YATT::Lite; my $tmpl = q{ <!yatt:args title who="?World"> <h2>&yatt:title;</h2> Hello &yatt:who;! <!yatt:widget alter title who="?Space"> <div class="title">&yatt:title;</div> <div class="body"> Hello &yatt:who;! </div> }; # string based templating. my $yatt = YATT::Lite->new(vfs => [data => $tmpl], app_ns => "MyYATT"); # to invoke above template, call 'render' method. print $yatt->render("", {title => "My First YATT"}), "\n"; # If you want to write large data directly into filehandle, use 'render_into'. $yatt->render_into(\*STDOUT, alter => ["My Second YATT"]); # Multiple template. my $yatt2 = YATT::Lite->new(vfs => [data => {foo => "..", bar => ".."}] , app_ns => "MyYATT2"); print $yatt2->render(foo => [1,2]); print $yatt2->render(bar => [3,4]); # And filesystem based templating. my $yatt3 = YATT::Lite->new(vfs => [file => "my.yatt"], app_ns => "MyYATT3"); my $yatt4 = YATT::Lite->new(vfs => [dir => "my.ytmpl"], app_ns => "MyYATT4");
YATT is Yet Another Template Toolkit, aimed at empowering Web Designers. YATT::Lite
is latest version of YATT. For overview, see readme.
"KOBAYASI, Hiroaki" <hkoba@cpan.org>