in reply to Template Toolkit 2 and subroutines
because that's close to what you want. The resulting structure looks something as if you would say:[% MACRO my_own_func BLOCK %] ... [% END %]
Of course, the real thing I've gotta ask is why not just create a Plugin, or even just a coderef in the initial stash? Embedded Perl kinda defeats the whole point of TT.[% PERL %] $stash->set('my_own_func', sub { ... }); [% END %]
-- Randal L. Schwartz, Perl hacker
|
|---|