develooper Front page | perl.perl5.porters | Postings from January 2005

PERL5LIB broken in some cases?

Thread Next
From:
Ken Williams
Date:
January 12, 2005 18:06
Subject:
PERL5LIB broken in some cases?
Message ID:
A91CEEF6-6507-11D9-BEE3-000A95BD9874@mathforum.org
Hi,

A user on the Module::Build list has shown me a shell transcript from 
Fedora Core 3 where setting PERL5LIB has results contrary to the 
documentation.  He says:

> When I do "PERL5LIB=blah:foo" and "perl -le 'print for @INC'", I get 
> this prepended to the list of 30 odd entries I would get with PERL5LIB 
> unset:
>
> blah/5.8.5/i386-linux-thread-multi
> blah/5.8.5
> blah/i386-linux-thread-multi
> blah/5.8.4
> blah/5.8.3
> blah/5.8.2
> blah/5.8.1
> blah/5.8.0
> blah
> foo/5.8.5/i386-linux-thread-multi
> foo/5.8.5
> foo/i386-linux-thread-multi
> foo/5.8.4
> foo/5.8.3
> foo/5.8.2
> foo/5.8.1
> foo/5.8.0
> foo

(of course, none of those foo/* and blah/* directories actually exist 
on the filesystem.)

On my machine (Mac OS X), I only see the two new lone entries "blah" 
and "foo", which agrees with the PERL5LIB docs in perlrun.pod.  I 
suspect a bug in the PERL5LIB code in perl.c, probably in the "#ifdef 
PERL_INC_VERSION_LIST" areas, but I can't actually see it.

Anyone able to verify this behavior, and/or see where the bug is?

Seems like "PERL5LIB" and "use lib" should share their code behind the 
scenes so they'd agree with each other - and then PERL5LIB would get to 
use whatever regression tests lib.pm has, too.

  -Ken


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About