| June 27, 2005 | Phalanx from the Trenches | Prev Next |
Sam Tregar's test for caching template in memory
Note: cache_debug feature turned off
$template = HTML::Template->new(
path => ['templates/'],
filename => 'simple.tmpl',
cache => 1,
# cache_debug => 1,
);
$template->param(ADJECTIVE => sub { return 'v' . '1e' . '2r' . '3y'; });
$output = $template->output;
$template = HTML::Template->new(
path => ['templates/'],
filename => 'simple.tmpl',
cache => 1,
# cache_debug => 1,
);
ok($output =~ /v1e2r3y/, "template value correctly returned from cache");
| Home Last TOC | Copyright © 2005 James E Keenan and Marc Prewitt | Prev Next |