Mailing List Archive

[RareModules] Apache::OutputChain
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.
------------------------------------------------------------------------
RE: [RareModules] Apache::OutputChain [ In reply to ]
I tried some time ago to get OutputChain and Filter to work with Registry
scripts. It was a bit over my head at the time, and I haven't tried
since...

I think I remember Ken Williams saying he was working on integrating Filter
into Registry... status?

does anyone have any experience chaining modules with Registry? anyone
doing this on a regular basis?

--Geoff

> -----Original Message-----
> From: Honza Pazdziora [mailto:adelton@informatics.muni.cz]
> Sent: Wednesday, February 23, 2000 8:53 AM
> To: modperl@apache.org
> Subject: [RareModules] Apache::OutputChain
>
>
>
> 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.
------------------------------------------------------------------------
Re: [RareModules] Apache::OutputChain [ In reply to ]
On Wed, Feb 23, 2000 at 09:14:30AM -0500, Geoffrey Young wrote:
>
> does anyone have any experience chaining modules with Registry? anyone

Yes, I did this when I was verifying that Apache::OutputChain works.

> doing this on a regular basis?

Not now.

--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
.project: Perl, DBI, Oracle, MySQL, auth. WWW servers, MTB, Spain.
------------------------------------------------------------------------
RE: [RareModules] Apache::OutputChain [ In reply to ]
> I tried some time ago to get OutputChain and Filter to work with Registry
> scripts. It was a bit over my head at the time, and I haven't tried
> since...
>
> I think I remember Ken Williams saying he was working on integrating Filter
> into Registry... status?
>
> does anyone have any experience chaining modules with Registry? anyone
> doing this on a regular basis?
>
> --Geoff

Hi Geoff,

I'm using it on a regular basis. Here's the config snippet:

Alias /majcd /usr/local/www/cgi/aef/majcd
<Location /majcd>
SetHandler "perl-script"
Options +ExecCGI
PerlHandler Apache::OutputChain Apache::GzipChain Apache::Registry
</Limit>

It's really a regular Apache::Registry setup, except for the added
modules in the PerlHandler line.

HTH,
--
Eric