You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Geoffrey Young <gy...@laserlink.net> on 2001/01/09 20:00:35 UTC

phases...

just a little internals question...

do all mod_perl hooks correspond to apache hooks?  Do they have to?

I've always wondered if it would be possible to add an extra pseudo-phase
after content generation - kinda so I could set up different <Location>s to
do whatever, then run EVERY request through a process that added
stylesheets/formatting (and skipped various MIME types, or whatever...)

Maybe the 2.0 filter mechanism will make this easier than now, though

anyway, just curious about what really goes on behind the scenes...

--Geoff

Re: phases...

Posted by Gerald Richter <ri...@ecos.de>.
>
> do all mod_perl hooks correspond to apache hooks?

more or less..., CleanupHandler isn't quite an Apache Hook, but get's called
when Apache cleans up his request data.

>Do they have to?
>

mod_perl doesn't get control outside of a Apache hooks (and resource
cleanup). The only addtional possibility where mod_perl could step in, would
be to use Ralf Engelschalls EAPI. This provides some additional hooks, where
Apache modules can register handler for it, but it's not part of the
standard Apache distribution.

> I've always wondered if it would be possible to add an extra pseudo-phase
> after content generation - kinda so I could set up different <Location>s
to
> do whatever, then run EVERY request through a process that added
> stylesheets/formatting (and skipped various MIME types, or whatever...)
>

Looks like you may use Stacked Handlers. (like Apache::Filter) You could
push such a Stacked Handler in an earlier phase (e.g. FixUpHandler) on the
stack, so you don't have to configure it for every Location.

> Maybe the 2.0 filter mechanism will make this easier than now, though
>

Yes, of course

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925151
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------