It appears that CONSTANTS does not play well with Context. I've tried some
combination of:
my $context = Template::Context->new(
{
CONSTANTS => {
home => 'http://www.google.com',
test => 5,
},
CONSTANT_NAMESPACE => 'const',
STAT_TTL => 1,
}
) or die $Template::Context::ERROR;
my $tt = Template->new(
{
CONTEXT => $context,
},
);
$tt->process('test');
--
my $context = Template::Context->new(
{
STAT_TTL => 1,
}
) or die $Template::Context::ERROR;
my $tt = Template->new(
{
CONTEXT => $context,
CONSTANTS => {
home => 'http://www.google.com',
test => 5,
},
CONSTANT_NAMESPACE => 'const',
},
);
$tt->process('test');
--
And having it in both, but it does not appear to find it in the templates.
Thanks!
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates