Re: [mp2] Dynamically pushing output filters -- Questions

[prev] [thread] [next] [Date index for 2005/05/21]

From: Chris Jacobson
Subject: Re: [mp2] Dynamically pushing output filters -- Questions
Date: 03:17 on 21 May 2005
Stas Bekman wrote:

> Chris Jacobson wrote:
>
>> Hello,
>>
>>    I am attempting to write a system which allows output filters to 
>> be dynamicaly pushed on the output filter stack at the end of a 
>> PerlResponseHandler. 
>
>
> That doesn't make any sense, Chris. By the end of the 
> PerlResponseHandler the response is gone and there is nothing to 
> filter. You can only add it *before* you start sending any data.
>
Sorry about that.  I am attempting to push the output filter handler 
before the end of the PerlResponseHandler.   The  code snippet from 
before which is generating the filter objects is run before calling 
$r->print().

>
> The fact that you get a segfault is not good, we should take care of 
> that. regardless you code is incorrect.
>
>> I can not seem to get anything to work here except a simple coderef.  
>> This defeats my entire purpose of dynamically pushing filter 
>> handlers, if they can only be a simple subroutine.  Is there any 
>> possible way to use an object as a filter handler, or can it only be 
>> a monolithic subroutine code reference?
>
>
> Filter handlers are very similar to all other mod_perl handlers, so 
> whatever works for mod_perl handlers works should work for filters.
> I haven't tried using objects as filter handlers. May be in a few days 
> unless someone beats me to it.
>
Thanks for the response.  I will keep tinkering with it over the weekend 
to see if I can resolve the seg faults.

        -- 
        Chris Jacobson
Online-Rewards.com
2900 Jefferson Ave.
Cincinnati, OH 45219

(513) 665-9070 x310
http://www.online-rewards.com

Re: [mp2] Dynamically pushing output filters -- Questions
Chris Jacobson 03:17 on 21 May 2005

Generated at 15:53 on 25 May 2005 by mariachi v0.52