Chris Jacobson wrote:
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().
That's better :)
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.
I suppose we didn't put enough defense in the code accepting the callback
argument, expecting the user to do the right thing.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com