> my $template = Template->new({
> OUTPUT => $r,
> EVAL_PERL => 1,
> INCLUDE_PATH => "$troot/src:$troot/lib:$troot/imgs"});
use vars qw($template);
$template ||= Template->new({
EVAL_PERL => 1,
INCLUDE_PATH =>
"$troot/src:$troot/lib:$troot/imgs",
});
There are many variations on this theme (like using a singleton object,
initializing during startup.pl to save memory, etc.) but the point is to use
the same Template object on each request. If you create a new one each
time, you are defeating the caching built into TT.
- Perrin