You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interesting. It appears to have to do with the use of a customized Template::Provider subclass that is used by TtRenderer. I can reproduce the behavior with a simple script thusly:
use strict;
use warnings;
use Template;
my%config = (
CONSTANTS=> { foo=> 123 },
);
$config{LOAD_TEMPLATES} = [ Template::Provider->new(%config) ];
my$tt = Template->new(\%config);
$tt->process(\"Foo is [% constants.foo %]\n");
when I run this I get:
helix% perl foo.pl
Foo is
if you look at the source code for TtRenderer you will see that it uses a Template::Provider subclass to handle some of the magic of finding templates in __DATA__ sections etc.
Unfortunately the plugin does not work without the the Template::Provider subclass. I think this is a Template Toolkit issue, but I am happy to accept a patch which fixes it here if the problem is in TtRenderer.
It seems like
CONSTANTS
aren't being passed to the Template engine.Is there something that I'm missing about passing in
CONSTANTS
?The text was updated successfully, but these errors were encountered: