| HTML::Template::Compiled::Lazy - Lazy Loading for HTML::Template::Compiled |
HTML::Template::Compiled::Lazy - Lazy Loading for HTML::Template::Compiled
use HTML::Template::Compiled::Lazy;
my $htcl = HTML::Template::Compiled::Lazy->new(
# usual parameters for HTML::Template::Compiled
);
$htcl->param(...);
# file wasn't compiled yet
print $htcl->output; # now compile and output!
This class does not compile templates before calling output().
This includes TMPL_INCLUDEs. This can be useful in CGI environments.
If your template has got a lot of includes the HTML::Template::Compiled manpage will
compile all of them, even if they aren't needed because they are never
reached (in a TMPL_IF, for example).
the HTML::Template::Compiled::Lazy manpage also won't complain if the file does
not exist - it will complain when you call output(), though.
| HTML::Template::Compiled::Lazy - Lazy Loading for HTML::Template::Compiled |