Arshavir Grigorian wrote: > Hello list, > > I am trying to use the stacked handlers functionality but cannot seem to > get it working. What I have is the following 2 modules: > > package Test; > > use strict; > > sub handler { > my $r = shift; > > $r->push_handlers(PerlResponseHandler => 'Test1::handler'); > > return Apache2::Const::OK; > } > > 1; > > package Test1; > > use strict; > > sub handler { > my $r = shift; > > $r->content_type('text/html'); > > print qq{<html><body><h3>we are here</h3></body></html>\n}; > > return Apache2::Const::OK; > } > > 1; > > <Location /test/> > SetHandler perl-script > PerlResponseHandler Test > </Location> > > I was hoping the request to http://localhost/test/ would eventually be > passed to Test1 and I would see the "we are here" message, but all I get > is an empty screen. Does anyone see any problems with this setup? TIA.
yes, stacked handlers works exactly like what you are doing for every phase _except_ content generation. to enable mod_perl for content generation you need to add SetHandler perl-script someplace, either in your httpd.conf or via a $r->handler('perl-script'); at the appropriate place. HTH --Geoff