I use "PerlConfigRequire /var/www/html/mypath/startup.pl" in httpd.conf to 
recompile all the CGIs. Inside startup.pl, 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 startup.pl 
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


Reply via email to