in reply to mod_perl, PerlSetEnv, and PERL5LIB
is there that much of a difference between a strictly Perl-based use lib and setting PERL5LIB in mod_perl?Mostly, that perl only reads $ENV{PERL5LIB} when it's started:
will work as expected, whileuse lib '/some/dir'; use Module;
will not, if Module.pm is in /some/dir.BEGIN { $ENV{PERL5LIB} = "/some/dir:$ENV{PERL5LIB}"; } use Module;
Either use lib or BEGIN { unshift @INC }, but you have to do both from perl; you can't use PERL5LIB, as perl is already running before apache starts reading the config files.
|
|---|