perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Wittkoski" <>
Subject Re: [MP2] apachectl doesn't run PerlModule code?
Date Tue, 27 Apr 2004 16:48:19 GMT

Geoffrey Young wrote on 4/27/04, 12:22 PM:

 > I think you're running into the "perl module loading is deferred" thingy
 > that is the default behavior in mp2. if you stuck a valid <Perl> section
 > above it you would probably see configtest fail, since an interpreter
 > would
 > be loaded.
 > basically, PerlModule no longer runs module code at the time that the
 > PerlModule directive is parsed unless an interpreter is already
 > resident in
 > the configuration process.  I'm not entirely certain as to the
 > rationale for
 > this, but I think it has something to do with startup times, overhead,
 > interpreter pools, etc.
 > now, I have problems with this sometimes - there are quite a few places
 > where I want PerlModule to run code, and _not_ doing so presents a vary
 > large problem.  in fact, people who depend on the mp1 behavior currently
 > have no recourse except to force in an interpreter via <Perl>.  well,
 > in mp2
 > we also have PerlLoadModule, which always runs module code on loading,
 > except that it is exclusively for the use of directive handlers (another
 > mistake I think, but not a battle I was able to win).
 > HTH
 > --Geoff

Thanks for the hint, that fixed things. If I put ANY <Perl> </Perl> 
section in the config - even if there is nothing in that block - it 
triggers the interpreter to start, and the rest of the PerlModule and 
PerlRequire statements in the config are executed.

I guess the docs I was looking at that mentioned PerlModule/PerlRequire 
get executed with 'configtest' were for 1.x, although this is behavior 
that I would expect to be similar between both versions. I don't know 
how often people run into this - perhaps a note could be added to the 
"Migrating to 2.0" pages on about the difference in 

In my case, I am not concerned about startup time or overhead, but being 
able to use 'apachectl configtest' to let the module validate it's own 
config file (which is separate from httpd.conf) before restarting apache 
to make sure the whole thing can survive a restart.



Report problems:
Mail list info:
List etiquette:

View raw message