perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c chan <>
Subject question on overriding perl search path
Date Fri, 18 Jan 2008 07:00:05 GMT
I use "PerlConfigRequire /var/www/html/mypath/" in httpd.conf to recompile all the
CGIs. Inside, I added the line:

  use lib qw(. mylib);

To me amazement, after all the CGI is precompiled, they start to look into the "." and "mylib"
path for loading Perl Modules without even having the line [use lib qw(. mylib);] incorporated
in each individual cgi script. 

Can someone explain to me why this is the case? Is the mod_perl script simply becomes
the parent apache process for all the preloaded CGIs?

If I remove mod_perl, can I use the 

  PerlSetEnv -I/var/www/html/mypath -I/var/www/html/mypath/lib 

to achieve the same result.

This will make a profound effect on my CGI directory because whatever I installed will no
longer affect the system perl module search path. In effect, this will make my application
self contained and making trouble shooting make easier.

- C Chan

View raw message