On Tue, 15 May 2001, Geoffrey Young wrote:
 
> arg, if you can't reproduce it...

i can with Apache::Dispatch, not sure why my other test didn't work, er,
break.

> anyway, no combination of the below patches seemed to work.

the one below will work.
 
> I think it has something to do with PerlWarn and the second pass of
> httpd.conf - see below for my boiled down httpd.conf and a trace.  If I
> comment out PerlWarn everything starts as expected.

right, because the generated .xs calls:
         if (dowarn) {
             /* avoid subroutine redefined warnings */
             perl_clear_symtab(gv_stashpv("$class", FALSE));
         }
and perl_clear_symtab() calls cv_undef();

Index: src/modules/perl/perl_config.c
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v
retrieving revision 1.108
diff -u -r1.108 perl_config.c
--- src/modules/perl/perl_config.c      2000/12/30 05:08:59     1.108
+++ src/modules/perl/perl_config.c      2001/05/15 16:34:50
@@ -1697,8 +1697,12 @@
            hv_clear(hv);
        if((av = GvAV((GV*)val)))
            av_clear(av);
-       if((cv = GvCV((GV*)val)))
-           cv_undef(cv);
+       if((cv = GvCV((GV*)val)) && (GvSTASH((GV*)val) == GvSTASH(CvGV(cv)))) {
+            GV *gv = CvGV(cv);
+            cv_undef(cv);
+            CvGV(cv) = gv;
+            GvCVGEN(gv) = 1; /* invalidate method cache */
+        }
     }
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to