[Templates] PROPOSAL: Add EVAL / EVALUATE directive.
Paul Seamons
mail@seamons.com
Wed, 13 Jun 2007 13:03:37 -0600
The Velocity syntax has an EVALUATE directive
that essentially plays the eval filter on the passed
variable. This directive would most likely not be available
until the TT3 release. EVAL would be an alias for EVALUATE just
like FOR is an alias for FOREACH.
Bonus points for supporting configuration arguments to
be passed along.
Template::Parser::CET supports the non-argument passing version.
Template::Alloy supports passing named arguments.
# works in Template::Parser::CET
[% foo = "[% some text %]" %]
[% EVALUATE foo %]
# works in Template::Alloy
[% foo = '<TMPL_VAR EXPR="1 + 2">' %]
[% EVALUATE foo syntax => 'hte' %]
Paul Seamons