Re: Upgrading chained response handlers to mod_perl2

Adam Prime <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Iain Kennedy wrote:
> Hi,
> 
> Is there a data structure that gets passed to each response handler in
> the chain that the processed file can be stored in (like $f->ctx)?
> 
> Can the old mod_perl1 ->filter_input behaviour be done by manipulating
> the input_filter or output_filter stacks?
> 
> Is what I'm trying to do vaguely sane, even? With the following directive:
> 
> PerlResponseHandler +Module::Test1 +Module::Test2

I'm not sure, but i don't think you can really do that in mp2, i think 
you need to read about how filters work in mp2, then do something like

PerlResponseHandler Module::Test1
PerlOutputFilter Module::Test2

where Module::Test2 has been rewritten using the filter API.  Geoff 
Young gave a talk about filters at an apachecon many moons ago that i 
found particularly helpful, you can still find the slides here:

http://www.modperlcookbook.org/~geoff/slides/ApacheCon/2006/mp2_filters-printable.pdf.gz


> Having both Test1 and Test2 process the HTML response body in turn with
> mod_perl1 was pretty straightforward. I reckon I must be missing
> something pretty obvious, surely?
> 
> Iain

HTH,

Adam
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.