On Mon, 26 Jun 2000, Jim Winstead wrote:

> We were seeing some servers spin out of control (allocating memory
> slowly) in Apace::Constants::AUTOLOAD (which apparently has been
> reported in the mailing list before).
> 
> The attached patch fixes the problems for us. Could someone who
> understands what is going on here shed some light?

ouch, how did you trigger this problem?  i don't see how that could
happen Apache::Constants::__AUTOLOAD should always be defined inside
httpd.  does this version of your patch prevent it?

--- Constants/Constants.pm      2000/03/03 20:42:01     1.20
+++ Constants/Constants.pm      2000/08/16 04:05:45
@@ -18,7 +18,7 @@
     #outside of mod_perl this will recurse looking for __AUTOLOAD, grr
     *AUTOLOAD  = sub {
        #why must we stringify first???
-       __AUTOLOAD() if "$Apache::Constants::AUTOLOAD"; 
+       __AUTOLOAD() unless $Apache::Constants::AUTOLOAD =~ /__AUTOLOAD$/;
        goto &$Apache::Constants::AUTOLOAD;
     };
 }


Reply via email to