Geoffrey Young wrote: [...]
Especially tests, since you wanted it because you wanted to ensure that the module is loaded early, but I have not seen any test cases.
Apache-AuthenHook on CPAN is a good example. at the end of AuthenHook.xs I have this code:
ap_register_provider(modperl_global_get_pconf(), AUTHN_PROVIDER_GROUP, SvPV_nolen(newSVsv(provider)), "0", &authn_AAH_provider);
which needs to be called _before_ mod_auth_basic or mod_auth_digest go looking for a provider specified in httpd.conf. if AuthenHook were not implemented via directive handlers there would be no way to do this outside of inserting <Perl> sections in httpd.conf or somesuch.
So Philippe you have a green light then :) And I suppose you can ping Geoff for more real-world tests, once you adjust the existing tests.
While we are at it, we may consider renaming this directive, since it's now getting even further away from Load thing. PerlModuleNow? PerlModuleEarly?
I think the name is exactly right. from an apache perspective, LoadModule runs a module's init routines when LoadModule is called, without later deferring the init until some later time. PerlLoadModule would do exactly the same - load a perl module and run it's init code _now_. using PerlLoadModule is analgous to all the other Perl* directives we have (PerlSetVar, PerlPassEnv, etc) that are pretty much behave exactly the same as Apache directives but are tweaked for Perl purposes.
sure. Just don't forget that most users aren't core apache people and they have no clue what LoadModule does besides loading the module. So I was trying to suggest semantics which will be more intuitive for the majority of the users, not a handfull of experts. And the non-experts will certainly confuse, PerlLoadModule and PerlModule, since the semantic different is very ambiguous if you take away your Apache internals knowledge.
Of course one could argue that PerlModuleEarly is just as ambiguous, but hey I was just suggesting a more intuitive name. I didn't suggest that it was the best choice.
as I've brought up before, I think the entire notion of "starting early" is bogus - it's not "early" if I require perl code to run while httpd.conf is being parsed, it is exactly the right time.
Are you trying to say that we should stop deferring the perl startup as you've suggested before?
-- __________________________________________________________________ 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]
