Apache::OutputChain was written as a way of exploring possibilities of
stacked handlers in mod_perl. It ties the STDOUT to object, which
catches the output and makes it easy to build a chain of modules that
work on output stream of data.
Examples of modules that are build on this idea are Apache::SSIChain,
Apache::GzipChain by Andreas Koenig and Apache::EmbperlChain by Eric
Cholet -- the first processes the SSI's in the stream, the second
compresses the output on the fly, the last adds the Embperl
processing.
The syntax goes like
<Files *.html>
SetHandler perl-script
PerlHandler Apache::OutputChain Apache::SSIChain Apache::PassHtml
</Files>
The modules are written in the reverse order of their execution --
here the Apache::PassHtml module simply picks the file's content and
sends it to STDOUT ... here it's processed by Apache::SSIChain ...
and then goes to Apache::OutputChain that sends the result to the
browser.
Alternative to this approach is Apache::Filter, which has more natural
"forward" configuration order and it's easier to make other modules to
be compliant with Apache::Filter.
I do not know how widely is Apache::OutputChain used and I do not
expect to do much development on it right now. You might or might not
find the module usefull. Apache 2.0 will probably gives us different
interface to achieve the same goal.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
.project: Perl, DBI, Oracle, MySQL, auth. WWW servers, MTB, Spain.
------------------------------------------------------------------------
stacked handlers in mod_perl. It ties the STDOUT to object, which
catches the output and makes it easy to build a chain of modules that
work on output stream of data.
Examples of modules that are build on this idea are Apache::SSIChain,
Apache::GzipChain by Andreas Koenig and Apache::EmbperlChain by Eric
Cholet -- the first processes the SSI's in the stream, the second
compresses the output on the fly, the last adds the Embperl
processing.
The syntax goes like
<Files *.html>
SetHandler perl-script
PerlHandler Apache::OutputChain Apache::SSIChain Apache::PassHtml
</Files>
The modules are written in the reverse order of their execution --
here the Apache::PassHtml module simply picks the file's content and
sends it to STDOUT ... here it's processed by Apache::SSIChain ...
and then goes to Apache::OutputChain that sends the result to the
browser.
Alternative to this approach is Apache::Filter, which has more natural
"forward" configuration order and it's easier to make other modules to
be compliant with Apache::Filter.
I do not know how widely is Apache::OutputChain used and I do not
expect to do much development on it right now. You might or might not
find the module usefull. Apache 2.0 will probably gives us different
interface to achieve the same goal.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
.project: Perl, DBI, Oracle, MySQL, auth. WWW servers, MTB, Spain.
------------------------------------------------------------------------