Examples of modules that are built using this idea are
Apache::EmbperlChain—the first processes the
SSIs in the stream, the second compresses the output on the fly, and
the last provides Embperl processing.
The syntax is like this:
PerlHandler Apache::OutputChain Apache::SSIChain Apache::PassHtml
The modules are listed in reverse order of their
execution—here the Apache::PassHtml module
simply collects a file's content and sends it to
STDOUT, and then it's processed
by Apache::SSIChain, which sends its output to
STDOUT again. Then it's processed
by Apache::OutputChain, which finally sends the
result to the browser.
An alternative to this approach is Apache::Filter,
which has a more natural forward configuration
order and is easier to interface with other modules.
Apache::OutputChain works with
Apache::Registry as well. For example:
Alias /foo /home/httpd/perl/foo
PerlHandler Apache::OutputChain Apache::GzipChain Apache::Registry
It's really a regular
Apache::Registrysetup, except for the added
modules in the PerlHandler line.
Available from CPAN. See the module manpage for more information.