[Templates] Global matching

Perrin Harkins perrin@elem.com
Wed, 04 Sep 2002 12:34:18 -0400


Mark Fowler wrote:
> Yesterday I wrote a whole set of examples of how to do this.

This is a nice summary of how to add Perl functions to TT.  How about 
packaging this up as a part of the documentation?

> The easiest way to do this is to add a subroutine to the stash that can do 
> the calling when you run the process method:
[...]
> The problem with doing this is that it requires you to know in advance 
> that you'll need to do occurrence counting.

I don't think that's really a problem.  It costs you nothing to add your 
own functions to the stash every time.  If I were using plugins, I would 
probably be adding them in ahead of time as well.

- Perrin