You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jared Cook <ja...@vsahost.com> on 2004/08/26 05:23:07 UTC
MP2 output filters
I am trying to implement a stream output filter and am having a little
problem. I need to have the INCLUDES filter process the output first
and then send it to the mod_perl filter. I used PerlSetOutputFilter
INCLUDES, and I think it is getting the data before it goes to my filter.
Now my problem: It looks like every include that gets processed starts
a new stream to my filter. I need mod_include to process all the
includes and THEN send the completed flat document to my mod_perl
filter. Is this possible? Please advise.
TIA,
Jared
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: MP2 output filters
Posted by Stas Bekman <st...@stason.org>.
Jared Cook wrote:
> I am trying to implement a stream output filter and am having a little
> problem. I need to have the INCLUDES filter process the output first
> and then send it to the mod_perl filter. I used PerlSetOutputFilter
> INCLUDES, and I think it is getting the data before it goes to my filter.
> Now my problem: It looks like every include that gets processed starts
> a new stream to my filter. I need mod_include to process all the
> includes and THEN send the completed flat document to my mod_perl
> filter. Is this possible? Please advise.
No, it's not. You filter should be able to cope with data coming in in
chunks. Please read:
http://perl.apache.org/docs/2.0/user/handlers/filters.html#Multiple_Invocations_of_Filter_Handlers
See an example on how to maintain state between filter invocations here:
http://perl.apache.org/docs/2.0/user/handlers/filters.html#Stream_oriented_Output_Filters
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html