Using Constants as Hash Keys

Stuart Johnston <[email protected]> Tue, 27 Nov 2012 11:49:59 -0600
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <[email protected]>
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?