Kee Hinckley wrote:> 1. *Why* are the apache config files executed twice (completely 
with 
> loading and unloading all the modules)?

This is a core apache thing.  Apache does it to verify that a restart is 
safe.  See 
http://thingy.kcilink.com/modperlguide/config/Apache_Restarts_Twice_On_Start.html

I'm not saying I think it's the greatest idea, but that's the reason 
behind it.

Modules loaded with PerlModule and PerlRequire are not supposed to be 
loaded again the second time.  I seem to remember that they are loaded 
again when using DSO though, so if you're using DSO you may want to 
recompile as static.  Also, if you have PerlFreshRestart on that will 
cause a reload.

A couple of people reported a bug that they were seeing which caused 
these modules to be loaded twice anyway.  That sounds like the issue you 
saw with <Perl> sections.  I haven't tested this myself, and fixing it 
would probably require help from Doug.  As a workaround, it is possible 
to do all of your module loading from a startup.pl called from 
PerlRequire, and avoid that problem.  That's what I do.

Of course my goal here sounds like exactly the opposite of yours: you 
actually *want* Embperl to get loaded both times so that your conf 
directives will work.  I haven't run into that problem before because I 
don't use any modules that add conf directives.  Maybe Gerald will have 
an explanation of what the expected behavior is on his end.  It can't be 
this much trouble for most people or no one would be using Embperl or 
custom conf directives.

- Perrin

Reply via email to