No, same error. Good idea though, thanks!

On 11/27/2012 12:11 PM, eric.b...@barclays.com wrote:
[% constants.$foo.value %]

Might work.



-----Original Message-----
From: templates-boun...@template-toolkit.org [mailto:templates-
boun...@template-toolkit.org] On Behalf Of Stuart Johnston
Sent: Tuesday, November 27, 2012 12:50 PM
To: templates@template-toolkit.org
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
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates
_______________________________________________


_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to