perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Slean" <ke...@wctravel.com>
Subject Influencing @INC list
Date Mon, 11 Feb 2002 21:29:43 GMT

Mod Perl Mongers...

I need to run multiple apache servers on one Solaris 2.7 box configured in
such a way that each of them accesses their own private copy of perl
libraries.  I would like to achieve this configuration with the
least amount of changes to my over all implementation.

For instance, given 2 apache servers defined in the following 2 directories:

   /usr/local/siteA   <- directory tree containing everything for server A
   /usr/local/siteB   <- directory tree containing everything for server B

The default perl installation on this unix system is under
/usr/local/lib/perl5 and the default @INC list is:

   /usr/local/lib/perl5/5.6.0/sun4-solaris
   /usr/local/lib/perl5/5.6.0
   /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
   /usr/local/lib/perl5/site_perl/5.6.0
   /usr/local/lib/perl5/site_perl
   .

BUT, I would like to influence the @INC list so it looks in a SITE/SERVER
specific directory.  SiteA's @INC list would be:

   /usr/local/lib/perl5/5.6.0/sun4-solaris
   /usr/local/lib/perl5/5.6.0
   /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/SITEA   <-- Note SITEA
directory appended here
   /usr/local/lib/perl5/site_perl/5.6.0
   /usr/local/lib/perl5/site_perl
   .

And SiteB's @INC list would be:

   /usr/local/lib/perl5/5.6.0/sun4-solaris
   /usr/local/lib/perl5/5.6.0
   /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/SITEB   <-- Note SITEB
directory appended here
   /usr/local/lib/perl5/site_perl/5.6.0
   /usr/local/lib/perl5/site_perl
   .

Note that SiteA should not have access to SiteB's modules stored in the
SITEB directory (and vica versa).

Kevin


Mime
View raw message