Brad Bowman wrote:
Can I avoid reparsing the message templates somehow?
Yes, if you pre-declare the templates as named BLOCKS:
my $tt = Template->new(
INTERPOLATE => 1,
START_TAG => quotemeta('<<'),
END_TAG => quotemeta('>>'),
+ BLOCKS => {
+ msg1 => 'The [% thing %] is broken',
+ }
);
And then process them by name:
$tt->process(\$msg_template, $context, \$message)
$tt->process($msg_template_name, $context, \$message)
HTH
A
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates