perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nico Erfurth <>
Subject Re: Making perl handlers handle non-Perl
Date Wed, 27 Feb 2002 22:06:15 GMT
Andy Lester wrote:

> How can I get mod_perl to handle all Apache output, whether or not it
> originates with mod_perl?
> I'm writing a module that needs to analyze all output generated by Apache.
> That's easy enough with stacked handlers, but I'm goofing something up
> with, say, static HTML.
> If I do this:
>         <Location /test>
>                 PerlHandler     MyFilter
>         </Location>
> Then static HTML gets served up OK, but MyFilter doesn't seem to get
> called.  Or is it, and I'm screwing something up in the filter?
> And of course if I do this:
>         <Location /test>
> 		SetHandler	perl-script
>                 PerlHandler     MyFilter
>         </Location>
> Then I get no output because the .html files that I'm trying to serve up
> out of /test aren't Perl.
> Pointers please?  I've got both the Cookbook and the Eagle book if you
> want to just point to a page.

<Just an idea>

Jou could try to set a location handler for

<LocationMatch "/*">
   SetHandler perl-script
   PerlHandler My::HandleEverything

your handler could tie the output-handle (is this possible?) and run a 

Now it could intercept the output (written to the handle) and do 
changes, or tidy it up, whatever you want......
And at least, it should return DECLINE, if it isn't the main-request

</Just an idea>

I'm not sure if this will work, because of the needed tie of the outputhandle and so on,

maybe anyone else can give a better statement ;)))

Mit freundlichen Grüßen
Nico Erfurth
Headlight Housingfactory GmbH

View raw message