perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj2taylo <>
Subject Re: mod_perl problems - require file
Date Wed, 13 Dec 2006 19:06:28 GMT

Thankgs for all the help guys.

Through some digging, I found some new files that were calling "require
moduleX.methods", which seem to be the culprit.  

Thanks again!

Perrin Harkins wrote:
> aj2taylo wrote:
>> Correct, moduleX.methods has sub routines defined, but is not itself a
>> package.  This is all part of a legacy system, and is used as
>> a
>> form handler, so moduleX.methods exists purely for architectural reasons
>> (separating certain functions from the form handling functions).
> Are you doing a "require moduleX.methods" in some other file too?  As 
> Jeff and Philip explained, this is what can get you in trouble, since it 
> will only load the first time it is required in a particular perl 
> interpreter.
>> This architectural approach has worked fine for years, and as stated
>> before,
>> there were no changes to moduleX.methods or changes to the top of
>> (where the require stmt is). 
> You may have just started requiring this module in some other file, or 
> added a modified copy of your moduleX form handler somewhere, or changed 
> what you load in  Then it will be a matter of chance which 
> one gets loaded first in each process, and the second to get loaded will 
> fail to require this file correctly.
> A quick and bad fix for this is to change your require statement to this:
>      do '';
> }
> That will ignore %INC and load it again anyway.
> A better solution is to put the moduleX.methods subs into a package. 
> That will save memory because it avoids loading them more than once in 
> separate namespaces.
> - Perrin

View this message in context:
Sent from the mod_perl - General mailing list archive at

View raw message