Eureka. Took quite a bit of debugging, but I finally tracked it down. First, the setup...our module structure goes something like this:
IQGroup
\_ Core
|_ IQCoordinator
|_ IQDeveloper
|_ IQNextNeatApplication
The IQGroup class is our master mod_perl handler -- it handles 99% of the
talking to Apache, as well as providing the handler() routine, error handling,
Apache config directives, etc. All of our apps inherit from it. IQGroup::Core
has all the classes shared between apps, then each app gets its own namespace to
do whatever with.
The problem emanates from perl_clear_symtab, which gets called from the
remove_module_cleanup function that Apache::ExtUtils sets up. As it traverses
the symbol table, it doesn't bother checking for something special like this
(trimmed for brevity):
SV = PVGV(0x8440a88) at 0x846130c
NAME = "Core::"
GvSTASH = 0x841d1e8 "IQGroup"
GP = 0x842d830
FILE = "/home/thebrain/perllib/IQGroup/Core/Utility.pm"
EGV = 0x846130c "Core::"
And gleefully blows it away, thus annihilating the symbol tables for
IQGroup::Core and everything under it.
Presumably perl_clear_symtab isn't supposed to touch symbol tables other than
for the module it's currently dealing with, so the attached patch tells it to
leave them alone. This has completely fixed the problem on my end. Note I
couldn't find any better way of telling if an entry was a symbol table hash, so
feel free to change this if you know a trick I don't.
--
Stephen Clouse <[EMAIL PROTECTED]>
Senior Programmer, IQ Coordinator Project Lead
The IQ Group, Inc. <http://www.theiqgroup.com/>
Index: src/modules/perl/perl_config.c
===================================================================
RCS file: /home/thebrain/.cvsroot/mod_perl/src/modules/perl/perl_config.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 perl_config.c
--- src/modules/perl/perl_config.c 2001/11/20 23:55:59 1.1.1.1
+++ src/modules/perl/perl_config.c 2001/12/12 23:54:35
@@ -1685,7 +1685,7 @@
CV *cv;
dTHR;
- if((SvTYPE(val) != SVt_PVGV) || GvIMPORTED((GV*)val))
+ if((SvTYPE(val) != SVt_PVGV) || GvIMPORTED((GV*)val) || ((hv = GvHV((GV*)val))
+&& strstr(key,"::")))
continue;
if((sv = GvSV((GV*)val)))
sv_setsv(GvSV((GV*)val), &sv_undef);
msg23485/pgp00000.pgp
Description: PGP signature
