Hi All --

I'm in the process of migrating a mod_perl site from Apache 1.3 to
Apache 2. I'm using RedHat ES4, which ships with Perl 5.8.5, Apache
2.0.52, and mod_perl 1.99_16.

Problem is, I can't seem to get PERL5LIB working as expected. Under
Apache 1.3, following was in the block:

PerlSetEnv PERL5LIB '/path/to/my/modules'
PerlRequire "conf/startup.pl"

SetHandler perl-script
PerlHandler Apache::Registry

This was sufficient to insure that all ".pl" files used the correct
libraries. Under Apache2, this does not appear to be the case. I
have changed the above block to as follows:

PerlSetEnv PERL5LIB '/path/to/my/modules'
PerlTaintCheck Off
PerlModule perl5lib
PerlRequire "conf/startup.pl"

SetHandler perl-script
PerlHandler ModPerl::Registry

Still I get errors when I try to run scripts which use modules:

Can't locate Foo/Bar.pm in @INC

Odder still(!), is that $ENV{PERL5LIB} *does* report correctly if I
dump it in a BEGIN block! In fact, if I add the following to my
scripts, they *DO* work:

my @libs = split(/:/, $ENV{PERL5LIB});
unshift(@INC, @libs);

Unfortunately, this would have to be added to every script. I'm not
opposed to doing it, but it seems like there ought to be a better way.
Any ideas?

(FYI, I've tried both "PerlSwitches -I" and "PerlSwitches -Mlib=", to no avail.)