in reply to Default filter in TT
Edit: Please do not use this and look at Template::AutoFilter for a much better solution instead!
(You can study this though if you want to see some pretty terrible monkey-patching.)
After some poking by tinita on the subject and looking at the horror that is Template::HTML i decided to implement a much more brutal, but more effective and way more straight-forward method of applying a user-defined filter to any unfiltered token, while still allowing exclusion of specific tokens.
As i implemented it just now, you won't find it on CPAN (yet). You can get the code here:
AutoFilter.pm
Please let me know if it breaks in some way for you and i'll attempt to get it fixed.
(You can study this though if you want to see some pretty terrible monkey-patching.)
After some poking by tinita on the subject and looking at the horror that is Template::HTML i decided to implement a much more brutal, but more effective and way more straight-forward method of applying a user-defined filter to any unfiltered token, while still allowing exclusion of specific tokens.
As i implemented it just now, you won't find it on CPAN (yet). You can get the code here:
AutoFilter.pm
Please let me know if it breaks in some way for you and i'll attempt to get it fixed.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Default filter in TT
by morgon (Priest) on Jan 02, 2011 at 21:33 UTC | |
by mithaldu (Monk) on Jan 02, 2011 at 22:18 UTC |
In Section
Seekers of Perl Wisdom