I don't think it's impossible, but I think it will be hard - we'd basically need to change the nOrder value in the each hook structure at some point then call apr_hook_sort_* manually. I might be able to do this when some directive is parsed or it may need to be a request-time operation - I can't be sure without trying it first. but the whole thing gives me the willies, and I feel like we'd be introducing some magic that might add some instability for very little value.
It shouldn't be hard at all. You can use server startup -D arguments to control that. Look at modperl_register_hooks which pushes -DMODPERL2. At the same place you can read ap_server_config_defines array and make different decisions on the order. So you could run:
httpd -DTRANS_REALLY_LAST -DRESPONSE_REALLY_FIRST
etc...
so it would be neither a compile time option, nor a configuration option, but a program define.
yeah, I had thought about it too. but I was still leaning toward a compile-time-only option, since the great, great majority of users will want the default APR_HOOK_REALLY_FIRST configuration. and we have never used -D options before, so it would be something new.
but if you and philippe like that idea better than compile-only, I'll do it that way - I don't feel strongly about it, so long as users have _some_ way to control it short of editing generated files :)
I agree with Philippe that any/most compile-time options are a bad idea. At least because most users don't compile mp by themselves but use a prepackaged version. So normally they won't have an idea on how to make things their way. And bug reporting is complicated too.
I like the idea of -D. We just need to come up with an intuitive naming.
oh, and just for the record, this was not what I was really talking about in the above :) what I had in mind when saying "it will be hard" is something like
PerlHookTranslation First
<Location /foo> PerlHookFixups Last </Location>
which is what I was thinking about when I said "dynamic." and I think it's probably doable, but as I mentioned I'm not sure the cost is worth the added value, so I'm not likely to invest time in it at this point.
I'm really not sure how are you planning to implement that idea.
__________________________________________________________________ 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]
