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

Re: pop @INC (".")

Thread Previous | Thread Next
From:
Todd Rinaldo
Date:
March 8, 2012 14:39
Subject:
Re: pop @INC (".")
Message ID:
329EE331-6F56-457D-A274-2E703EEB97F6@cpanel.net

On Mar 8, 2012, at 2:58 PM, Jan Dubois wrote:

> On Thu, 08 Mar 2012, David Golden wrote:
>> Let me answer your points in reverse order.
>> 
>>> Does anyone besides me share my concern that putting "." in the path
>>> isn't always necessarily desirable?
>> 
>> I agree that it's not always desirable, but I'm not convinced that
>> it's never desirable, either. Or rather, if undesirable, how/when
>> should it be removed from @INC. Optionally with "-T" or mandatory
>> enforcement by the interpreter?
> 
> I find it always undesirable.  What I usually want is mylib.pm,
> and '.' in @INC does provide similar functionality while testing
> from inside the script directory:
> 
>    http://search.cpan.org/dist/mylib/mylib.pm
> 
> If I really wanted '.' in @INC, then -I. is a cheap commandline
> option, or "BEGIN { push @INC, '.' }" a trivial script addition.
> 
> But as I already said, I never really want '.' in @INC, I either
> want $FindBin::RealBin, or the directory pushed by mylib.pm.
> 
> So I think a Configure option to build perl without '.' in @INC
> would be fine (and core tests should be updated to accommodate that),
> but a forced -T does not feel right to me.

Jan says it better than me. This is my thinking.


Thread Previous | 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