NAME
YATT::Lite - Template with "use strict"
SYNOPSIS
# 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");
DESCRIPTION
YATT is Yet Another Template Toolkit, aimed at empowering Web Designers. YATT::Lite
is latest version of YATT. For overview, see readme.
CONFIGS
vfs
app_ns
EXPORTS
METHODS
render($name, %$args)
render_into($fh, $name, %$args)
entity($name, @args)
find_handler($type, $name);
find_renderer
find_part
find_file
find_product
ENTITIES
template()
stash()
file_rootname()
HOOKS
_handle_$type($fh, $file)
_handle_yatt($fh, $file)
AUTHOR
"KOBAYASI, Hiroaki" <hkoba@cpan.org>