On Tue, Dec 11, 2001 at 04:15:49PM -0600, Stephen Clouse wrote: > With the PerlModule/%INC problem recently being rehashed, here's another one > involving PerlModule vs. use that will really bake your noodle. > > Attached is a full mod_perl trace, where I hacked into perl_require_module a > dump of one of my vanishing namespaces on each module load. So you can > definitely see it's loading up properly. All is well until you reach the end, > where it starts reloading everything, and the namespace is now completely gone. > Exporter predictably throws an error at this point (since @EXPORT_OK is now > undefined) and the server fails to start. OTOH, one wonders how Exporter got > the call, since @ISA is gone as well. > > I posted this once before and got blown off -- a pox on to those who tell me to > check @INC or what not. There is nothing wrong with my code or my setup -- the > only change I have to make to get things working is to `use` all the PerlModule > modules in startup.pl first, before they're called with PerlModule. And don't > tell me to just use `use` either -- they all load up Apache config directives, > so PerlModule has to be called at some point so Apache recognizes the > directives. But if things were working as advertised, PerlModule would be all I > need. > > The two obvious questions: > > 1) Where the fsck did everything go? > 2) Why does this only emanate when stuff is loaded up via PerlModule? I mean, > look at perl_require_module -- all it does is `eval "require $foo"`. Hard to > go wrong there.
I'm willing to bet that this is the Known Nasty having to do with how Apache re-reloads modules. Are you using mod_perl as a DSO? If so, have you tried it statically? -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer