No, same error. Good idea though, thanks!

On 11/27/2012 12:11 PM, [email protected] wrote:
[% constants.$foo.value %]

Might work.



-----Original Message-----
From: [email protected] [mailto:templates-
[email protected]] On Behalf Of Stuart Johnston
Sent: Tuesday, November 27, 2012 12:50 PM
To: [email protected]
Subject: [Templates] Using Constants as Hash Keys

Trying to use a constant as a hash key gives this error: "unexpected
token (.)".

Here is what I am trying to do:

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

This works but is a bit ugly:

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

Any other suggestions?

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates
_______________________________________________


_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to