T
Tony Skelding
I am using a PerlSetEnv directive in order to have PERL5LIB set to a
directory list at request time. But the directories are being added
to @INC in reverse order.
For example, in my httpd.conf I have...
PerlSetEnv PERL5LIB foo:bar:xyzzy
In my handler I have...
print "$_\n" for @INC;
The output I get is...
xyzzy
bar
foo
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
However, if I simply set an environment variable in my shell, e.g.
$ export PERL5LIB=foo:bar:xyzzy
$ perl -e 'print "$_\n" for @INC'
I get...
foo
bar
xyzzy
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
..
directory list at request time. But the directories are being added
to @INC in reverse order.
For example, in my httpd.conf I have...
PerlSetEnv PERL5LIB foo:bar:xyzzy
In my handler I have...
print "$_\n" for @INC;
The output I get is...
xyzzy
bar
foo
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
However, if I simply set an environment variable in my shell, e.g.
$ export PERL5LIB=foo:bar:xyzzy
$ perl -e 'print "$_\n" for @INC'
I get...
foo
bar
xyzzy
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
..