At 18.02 -0500 11/20/2001, Robert Landrum wrote: >At 2:31 PM -0800 11/20/01, David Pisoni wrote: >> >We have been doing development using mod_perl, but finding that Apache::StatINC >was not working as expected (i.e., we needed to restart the web server in order to >see our module changes in effect.) Our apache config files preload all necessary >modules at start time using the 'PerlModule' directive. When I started peeking >through Apache::Status I found that although all of our loaded modules appear in the >"Inheritance Tree" and the "ISA Tree", most of them did not appear in the "Loaded >Modules" section. (I also did a test handler with a dump of the contents of %INC, >and said modules were missing.) The only modules of ours which DID appear were those >which were ALSO called for with 'use' calls by other modules. >>> >> > > >I just reread your original post... I think I may know what the problem is (maybe). >Are you using <Location> handlers? > ><Location /whatever> >SetHandler perl-script >PerlModule My::Special::Module >PerlHandler My::Special::Module ></Location> > > >If that is the case, My::Special::Module won't be loaded and compiled until the very >first time that someone hits /whatever.
Just about EVERY module we use has a 'PerlModule' call to it, outside any enclosing blocks. Although I do have 'PerlHandler' directives in <Location> and <Files> blocks, the modules they use are preloaded prior to the enclosing block. We're hip to shared memory :-) >This explains the missing modules in %INC (I think), but it does not explain the >problem with Apache::StatINC. > >> >Out of curiosity, I took our configuration file and changed all the 'PerlModule' >directives to 'use' calls (inside a <Perl> block), and lo and behold, they all >appeared in %INC. >>> >> > >And did this fix your problem with Apache::StatINC too? > >Rob > Yes. StatINC indeed uses %INC to do its magic. StatINC's success or failure in this situation is merely a symptom though, not the real problem. We could simply set our configuration files as I've described here, but I'm interested in mod_perl working correctly for everyone, hence I continue to beat this drum. :-) I don't assume that the problem is unique to us -- rather I assume that we're the only ones experiencing it who both realize it and are doing something about it. Thanks, David