Base class for all Filter modules.
Filter modules are run BEFORE the templates are processed, so that they can modify the templates before they are processed. Using an md5 hash, .pet files are modified and stored in the “cache” directory as “PRE_$md5hash.comp”.
To switch on a Filter module, you have to list it in global.conf, at general.template.filter, such as
<general> <template> filters = PET::Filter::PreMultiLang PET::Filter::UtilXmlMap ...
Usually you want to load PET::Filter::General in the chain at the first place. Filters are run in the order they appear in global.conf. You can of course write your own filters, too.
| PET:: | Base class for all Filter modules. |
| Variables | |
| $Disp | Exported on-demand, this is the main instance of PET::Dispatcher. |
| $Log | This is of course PET::Log, exported on-demand. |
| $Util | This is the main UTIL namespace, exported on-demand. |
| Functions | |
| new($DISP_in) | Constructor for a filter. |
| init | Not used by default, but called from “new” in case you needed it. |
our $Disp
Exported on-demand, this is the main instance of PET::Dispatcher.
our $Log
This is of course PET::Log, exported on-demand.
sub new
Constructor for a filter. Only need $DISP_in, the main PET::Dispatcher instance.
| $DISP_in | the main instance of PET::Dispatcher. |
Exported on-demand, this is the main instance of PET::Dispatcher.
our $Disp
This is of course PET::Log, exported on-demand.
our $Log
This is the main UTIL namespace, exported on-demand.
our $Util
Constructor for a filter.
sub new
Not used by default, but called from “new” in case you needed it.
sub init