On a separate issue (
VELOCITY-504) we came up with the idea of a new directive, #evaluate. Basically, it would act just like Velocity.evaluate().
Users are always asking for this capability (internal evaluation). Usually we tell them to "use a tool". Instead, we should just put in a simple directive that would evaluate a VTL string using the current context.
Incidentally, this should be the current local context, e.g. if inside a macro or a foreach loop (or worse, both) it should use that context. See
VELOCITY-504 for why this is needed.