develooper Front page | perl.perl5.porters | Postings from March 2012

Re: pop @INC (".")

Thread Previous | Thread Next
March 8, 2012 14:56
Re: pop @INC (".")
Message ID:
On Thu, Mar 08, 2012 at 01:38:53PM -0600, Todd Rinaldo wrote:
> We're planning on patching "." out of the @INC path for the perl we're about to build and distribute. I'm finding this change causes the test suite to blow up in all sorts of interesting ways. 
> My Question: Would you consider it a bug that items in the perl test suite assume that "." is in the @INC path?

I don't consider it a bug. @INC has contained "." since the dawn of time.
I bet there are tons of script happily running on servers everywhere,
doing their job, and depending on "." being in @INC.

Now, todays thinking may be that it's better not to have "." in @INC. And
while I won't argue with that, I don't think we should remove "." from
@INC.  IMO, breaking something that works now outweights any potential
advantages of not having "." in @INC by default.

If someone wants "." not to be in @INC, (s)he has a couple of options:
 - build a Perl with an @INC that does not have "."
 - use -M-lib=. on the command line; or in PERL5OPT
 - start the program with "no lib '.';"


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About