perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Jacobson <chris.jacob...@online-rewards.com>
Subject [mp2] Dynamically pushing output filters -- Questions
Date Fri, 20 May 2005 21:31:57 GMT
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


Mime
View raw message