Hello Matthew, Matthew Vickers wrote, On 10/12/11 19:32:
I could be completely off base, and please tell me if I am, when I need to use custom code in the template I use
before_template sub { my $tokens = shift; $tokens->{'my_custom_filter'} = &custom_filter; };
Thanks for the suggestion, but while it does add a sub to the template toolkit's namespace, it doesn't add it as a filter. I'm looking for a way to use filters as described here: http://search.cpan.org/~abw/Template-Toolkit-2.22/lib/Template/Manual/Direct... To be able to run template code as: [% VAR | my_custom_filter %] OR [% FILTER my_custom_filter %] lots of text [% END %] It seems this requires adding the filters in the template object creation step. Didn't yet find a way to do it.