perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: removing PerlLoadModule directive handler requirement
Date Thu, 22 May 2003 02:48:00 GMT
Geoffrey Young wrote:
[...]
> well, I guess we disagree then.  personally, I think the wrong part is 
> using PerlLoadModule for _only_ directive handlers, when all kinds of 
> other stuff can be coded/required to happen when a module is loaded.

We do agree that we need this functionality. All I'm telling you is that 
PerlLoadModule is not the right place, as it is implemented now, because it 
goes to the pains of registering a new module with Apache. Don't you think 
it's a bad design, if all you want is to trigger the perl startup early?

> but I'm not really in a position to rewrite a massive patch to fix it 
> all, so I guess I'll keep quiet for now.

There is no need to write a massive patch, neither being quiet. My suggestion 
is very simple:

In mod_perl 2.0 perl starting is deferred until after config phase has been 
completed (meaning that it'll start only after Apache restarts itself). 
However there are several directives, such as <Perl> sections and 
PerlLoadModule that will trigger a perl start during the config phase. If perl 
is not started during the config phase, all directives like PerlModule and 
PerlRequire are postponed till after the config phase. If you wish to force 
those to run immediately during the config phase, you can turn on the early 
perl startup using the PerlStartNow directive.

now we just need to implement this simple directive.

BTW, as I think about it, since the startup file execution is normally 
postponed, it's impossible to change the config via $s->add_config. So this is 
another case where perl must be started early.

Alternatively we can take a more intuitive direction (mp1-like): always start 
perl as soon as mod_perl.so is loaded. Have a directive that will try to 
postpone the startup of perl.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message