Hi folks,
I would like to kind of pre-process the templates I pass to TT. However,
I want to keep all the nice caching features (disk+memory), so what I
would like to do is to first filter the file TT is processing through a
sub I wrote, but *only* when the file is changed on disk (which TT knows
and handles anyway). So I need something like:
sub process {
# ....
# do lots of magic
# ...
# if (template_changed_on_disk) $text = slurp ....
# ...
&my_filter_hack(\$text); # doing some multilingual preporcessing
# ...
# continue magic
# ...
}
Is there an easy way to do what's above? Preferably without subclassing
/ rewriting Template.pm :)
Thanks,
- Fagzal
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates