in reply to Template Toolkit 2 and subroutines

I find it very useful when trying to write inline Perl to turn on $Template::Parser::DEBUG and look at the resulting code for a similar construct. Here, I did it for:
[% MACRO my_own_func BLOCK %] ... [% END %]
because that's close to what you want. The resulting structure looks something as if you would say:
[% PERL %] $stash->set('my_own_func', sub { ... }); [% 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.

-- Randal L. Schwartz, Perl hacker