I've brought it up before, but it looks like users are having real problems with the way 2.0 hooks modules into the request phases.
in 1.0, module order was determined by compile-time ordering or LoadModule/ClearModuleList/AddModule, neither of which exist in 2.0, where Apache chose the HOOK_FIRST/HOOK_MIDDLE/HOOK_LAST approach.
the issue is that for mod_perl to be effective, it really needs to get first crack at the phases. for instance, currently a PerlTransHandler wouldn't be guaranteed to run at all if another module (say, mod_proxy) got there first. while there are some occasions where you might want mod_proxy there first, they are typically rare in mod_perl applications.
so, I'd like to suggest that at least for the request-time hooks we move mod_perl to APR_HOOK_REALLY_FIRST. this will give users similar behavior to the way mod_perl used to work in 1.0.
Sounds fine to me.
What happens if another module has also used REALLY_FIRST? You still can't ensure 100% that mp's handler will run first.
that's what I propose to do immediately. as a second step, I'm going to look into making it either compile-time or runtime configurable. while I'm sure I can do the former, I'm convinced the latter is possible but probably not practical.
Don't we have a todo item suggesting to provide an API hooks ordering?
todo/features_missing:* hooks ordering is not implemented yet Owner: geoff
An idea to explore is to introduce pre and post hooks (for each request phase), which will correspond to really first and really last hooks, keeping the normal handler as it is now. i.e. register 3 hooks (or even 5) for each phase. This of course could be a compile time thing.
If you move all mp hooks to be really first, I think you need at least a post hook, so if you are inside that really first hook and you realize that you aren't ready to run, you could call ->push_handlers to reinsert yourself into the post hook (really last) of the same phase. So in this example you get two hooks for each phase: one really first and the other really last.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]