On Tue, 23 May 2000, Marc Lehmann wrote:
> On Tue, May 23, 2000 at 11:53:04AM -0700, Doug MacEachern <[EMAIL PROTECTED]> wrote:
> > > a lot of data sharing between the httpd servers. My module requires you to
> > > call "configured PApp" at the end of the configuration section so that it
> > > can pull in most of the code and big data structures before it forks (so
> > > the data gets shared). AFAIK there is no way to make this automatic.
> >
> > what's wrong with having 'PerlModule foo' at the bottom of your config
>
> Nothing. It's just that users of my module constantly forget that ;)
>
> > file? apache 1.3 has no 'post-config' hook, 2.0 does though.
>
> Another non-issue, then ;)
>
> > > PerlFreshRestart On
> > > PerlModule X
> >
> > yes, because apache does module-init/config-read twice at startup, since
> > you have 'PerlFreshRestart On', your module is re-compiled on this second
>
> BINGO, exactly. Thanks a lot for clarifying!! Here is a proposed extension
> for perldoc mod_perl / RESTARTING:
>
> PerlFreshRestart On
>
> Please note that setting this option results in parsing your modules
> twice at server startup, and reparsing at every restart. Old code and
> variables are not cleared and might interfere with your module. Avoiding
> lexical variables at global scope and not referencing subs before
> declaration/definition is therefore recommended.
You can control what's being reloaded and what's not:
http://perl.apache.org/guide/config.html#Apache_Restarts_Twice_On_Start
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://perl.org http://stason.org/TULARC
http://singlesheaven.com http://perlmonth.com http://sourcegarden.org