Excuse me if this has already been discussed, but I'm noticing some memory leaks with
Template-Toolkit 2.02 under perl 5.6.0.
Here's some test code:
while (1) {
my $content = '[% FOREACH x %][% END %]';
my $t = new Template() or die $Template::ERROR;
$t->process(\$content, {});
}
There seems to be a problem whether using a scalar ref or filename for input, and
either a scalar for output or print to stdout. I haven't tested other combinations.
There's no problem when the template just contains simple vars, but when a foreach
loop is used, then I start to see leaks.
I've tracked down the potential problem to Document.pm line 66:
$block = eval $block;
When that's commented out there's no leak.
Is there a way to fix this, or is this something that's a perl 5.6.0 problem, not a TT
problem?
--
_______________________________________________________
Ade Olonoh, BOTTLED SOFTWARE
317.576.1120 x12 (phone) 317.576.1135 (fax)
_______________________________________________________