perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gAzZaLi <>
Subject Re: Running multiple copies of same site in ModPerl
Date Wed, 30 Nov 2011 18:54:00 GMT

What you're doing is not recommended as you run into namespace issues.

Perl caches files and modules that were loaded in %INC, so if you have 
files and modules with the same name, only one of them gets loaded. 
Possibly, as an exercise, if you switch the order of the ORIG and COPY 
lines in your, you'll see the changes you've made in ORIG and 
not the changes in COPY.

I've made the assumption here that your site is more than just the one file and both packages use other packages with the same 

Suppose your has "use mods::somepackage"
and has "use mods::somepackage",

with the file, Perl will load only the 
.../perl/COPY/mods/ file.

If however your site is just the file, and the package 
declaration is as you've written, my answer is off.

Good luck.


On 11/29/2011 7:29 PM, Nishikant Kapoor wrote:
> Hello List,
> 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.
> Would appreciate any help. Here is what I have in the config:
> /etc/httpd/conf/httpd.conf:
> ---------------------------
> PerlRequire /var/www/perl/
> <Location /ORIG>
> SetHandler perl-script
> PerlResponseHandler ORIG::MODS::base
> </Location>
> <Location /COPY>
> SetHandler perl-script
> PerlResponseHandler COPY::MODS::base
> </Location>
> /var/www/perl/
> -------------------------
> use lib qw(/var/www/perl);
> use lib qw(/var/www/perl/ORIG);
> use lib qw(/var/www/perl/COPY);
> 1;
> Apache/2.2.14 (Mandriva Linux/PREFORK-1mdv2010.0)
> apache-mod_perl-2.0.4-11mdv2010.0
> This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
> Thanks,
> Nishi

View raw message