On Tue, 30 Sep 2003 11:49:57 -0700, Stas Bekman wrote
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.
Stas,
That's fine. Although the behaviour has changed as recently as v1.27 where previously the contents of PERL5LIB were pushed onto @INC rather that unshifted.
Well, the fix in 1.27 was different:
PERL5LIB support now properly unshifts paths into @INC rather than push [Tatsuhiko Miyagawa <[EMAIL PROTECTED]>]
before 1.27, PERL5LIB was getting appended to @INC, instead of being prepended. As a side effect it got the values in PERL5LIB reversed, but at least they are coming in before the hardcoded @INC.
The problem with the current behaviour is that you need a special case when running under mod_perl. In our set up, we test our scripts as CGIs and with Apache::Registry and it's nice to be able to set PERL5LIB in one place rather than two.
On the second thought, chances are that nobody has been using a multiple-paths PERL5LIB, otherwise they would have complained like you did. So if nobody objects and we agree that the current behavior is buggy, +1 for your patch.
So what do you think, fix it? or document it?
and of course need to fix that in mp2.
__________________________________________________________________ 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]
