Simon Flack wrote:
Problem:
  at the beggining of each request PERL5LIB is prepended to @INC in
  reverse order. E.g.:
     SetEnv PERL5LIB "one:two:three:four"
  results in this:
     @INC = ('four', 'three', 'two', 'one', '/usr....', '...');

Environment:
  Tested with perl 5.6.1, mod_perl 1.27 and 1.28

A patch is attached to src/modules/perl/perl_util.c that adds the PERL5LIB variables in the correct order.

Thank you Simon.


It's a bug indeed. However I think we can't change this functionality in mp1 at this point, since it'll break other people's setups which rely on the current behavior. We probably should document this mis-feature.

We can fix it in mp2, which I'm quite sure has the same problem.

Please use this as a workaround:

my $PERL5LIB = "one:two:three:four";
unshift @INC, $_ for reverse split /:/, $PERL5LIB;

or something like that, from your startup.pl or using a <Perl> </Perl> section in httpd.conf.

Also attached is a test script and .htaccess that demonstrate the bug.

Notes:
  There might be a more elegent way of doing it.
  Apologies if the patch doesn't conform to the style guide - couldn't
      find it, and couldn't work out what indenting to use from looking.

There is none for mp1, which is a mess. the mp2 code style is much better and conforming to a single style.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to