perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Jacobson <>
Subject [mp2] Dynamically pushing output filters -- Questions
Date Fri, 20 May 2005 21:31:57 GMT

    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?


Chris Jacobson
2900 Jefferson Ave.
Cincinnati, OH 45219

513-665-9070 x310

View raw message