perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nishikant Kapoor <>
Subject Re: Running multiple copies of same site in ModPerl
Date Wed, 30 Nov 2011 18:15:43 GMT
Michael Peters wrote:
> On 11/29/2011 10:29 PM, Nishikant Kapoor wrote:
>> I have been running a ModPerl site fine with following configuration.
>> The problem started when I made a complete copy of the original site and
>> tried to run the two in the same environment. For some reason, calling
>> up the ORIG site ( now calls the COPY site at
>> None of the changes made in
>> are getting picked up even after restarting the apache server. However,
>> changes to are showing up fine.
> The problem is that mod_perl uses the same Perl interpreter for 
> everything (by default) and that interpreter is persistent. I'm 
> guessing that your "package" declaration in and 
> are the same. Perl won't load 2 packages of the 
> same name. The usual solutions are:
I thought about that too, and so I did change the "package" declaration 
in and but calling up still calls Here is what 
each has:

package COPY::MODS::base;

package ORIG::MODS::base;

And, as gAzZaLi suggested, I also tried switching the order of the ORIG 
and COPY lines in, and I could see the changes made in ORIG 
but not the changes in COPY. So, COPY indeed is overriding ORIG.

As for the #2 mentioned below, are there any pointers that you could 
refer to?

> 1) rename your modules so that they don't have the same package names.
> 2) run multiple separate apaches on the same physical server (not as 
> hard as it seems to most people and pretty easy to do if you're 
> running a proxy in front. And you really should be running a proxy in 
> front).
> 3) Try to have multiple Perl interpreters using a different Apache 
> MPM. I haven't seen anyone give a definitive guide to how to do this 
> (although I could have missed something) and results seem to be mixed.
> I prefer #2 and use it constantly. It also makes it really easy to 
> have separate dev environments each using their own code.

View raw message