[mp2] Dynamically pushing output filters -- Questions

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

From: Chris Jacobson
Subject: [mp2] Dynamically pushing output filters -- Questions
Date: 21:31 on 20 May 2005
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.  These output filters are generated from a master 
factory object. 

....
my $FilterType = "Foo";
my $FilterObject = My::FilterFactory->new($FilterType);  # 
Class::Factory subclassed module
# This will generate a My::Filter::Foo object which inherits methods 
from the factory object and overrides them as necessary
$r->add_output_filter($FilterObject->handler); # This call will Seg 
Fault the server
.....

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?

Thanks,
Chris

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

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

[mp2] Dynamically pushing output filters -- Questions
Chris Jacobson 21:31 on 20 May 2005

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