Re: Using Constants as Hash Keys

Larry Leszczynski <[email protected]> Thu, 29 Nov 2012 10:32:32 -0700
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <1354210352.32371.140661159789613.36B3601C@webmail.messagingengine.com>
Hi Stuart -

> It is a hashref. I just trimmed it down to the minimum that causes the 
> error. To be more clear:
> 
> [% x = { constants.foo => "value" } %]
> 
> Or:
> 
> [% function({ constants.foo => "value" }) %]

Maybe want something like:

    [%
        foo = constants.foo;
        x = { $foo => "value" };
    %]

?  (untested)


HTH,
Larry