PET::Filter::General

PET::Filter::General

This Filter should be the first one in the chain.  Currently it does only one thing: processes the {{:filename}} tag, which includes the named file into the source.  If you use filters, you probably want to use this instead of using e.g.  [% PROCESS “..”  %] or [% INCLUDE “..”  %]

FIXME: the documentation is incomplete.  FIXME: code should be reviewed.

Summary
PET::Filter::GeneralThis Filter should be the first one in the chain.
Functions
preprocess ($file, $content)This is called from PET::Dispatcher.
slurp ($file)Reads a file.

Functions

preprocess ($file, $content)

sub preprocess

This is called from PET::Dispatcher.  Should return scalar that containt the processed content.  FIXME: later this should be able to return a scalarref (content of preprocessed file?)

slurp ($file)

sub slurp

Reads a file.  Returns ‘’ if not found, otherwise returns a scalar.

Base class for all Filter modules.
sub preprocess
This is called from PET::Dispatcher.
sub slurp
Reads a file.
Close