Stas Bekman wrote:
Geoffrey Young wrote:
in addition to that, I'd like to add support for hook position. that is, make it possible to have, say, content as APR_HOOK_FIRST but translation as APR_HOOK_LAST.
What API were you thinking of?
something like MP_ALL_HOOK_FIRST (default), MP_ALL_HOOK_LAST, MP_TRANS_HOOK_FIRST, etc. it's a lot of options to parse, but it might be a nice feature.
Yes, I meant where are you going to use those hooks? And how are they can be used by users.
well, it's a compile-time thing - as far as I know, you can't change how a hook is registered after it's been registered. so, for users these would be compile-time options.
Got it!
unless you think we can pull some hokey-pokey and have them as PerlOptions config-time options through deft use of macros or something?
the hook values need to be known before modperl_register_hooks() is called. So post compile it's possible to affect those via env variables or options to httpd. e.g. you could say:
env MP_TRANS_HOOK=FIRST httpd
or
httpd -DMP_TRANS_HOOK=FIRST (not sure about =FIRST)
perhaps we can start with having this functionality without messing with compile time options. You can use apr_get_env() to get the environment and ap_exists_config_define() to get the defines.
the issue with apr_get_env() is that it was added in apr-0.9.3
(#ifdef APR_VERSION_0_9_3_PLUS), before that I don't think we have any other portable way to get env vars. see how I handle it in mod_perl.c to read PERL_HASH_SEED)
Does it sound good?
However unless you are inclined to work on these I'd suggest to work on more urgent things first. e.g. we need to sync the mod_perl API with apr/ap, hopefully before the next release, which should happen rsn. i've posted a few patched before, I'll review and commit them. However there are quite a few other APIs that need syncing. What do you think?
__________________________________________________________________ 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]
