develooper Front page | perl.perl5.porters | Postings from October 2016

[perl #127810] Provide -Dfortify_inc Configure option to remove .from @INC

Thread Next
From:
Todd Rinaldo via RT
Date:
October 20, 2016 20:41
Subject:
[perl #127810] Provide -Dfortify_inc Configure option to remove .from @INC
Message ID:
rt-4.0.24-27504-1476996092-624.127810-15-0@perl.org
On Thu Oct 20 13:37:26 2016, xsawyerx@gmail.com wrote:
>
> While we're at it, mst also noticed another issue: "do" doesn't work
> on
> current directory, as one might expect, but relative to @INC.
> 
> $ echo "print 'hello'" > eg.pl ; perl -le 'do "eg.pl";'
> hello
> 
> $ echo "print 'hello'" > eg.pl ; perl -le 'pop @INC if $INC[-1] eq
> ".";
> do "eg.pl";'
> (no output)
> 
> However, you can still do:
> 
> $ echo "print 'hello'" > eg.pl ; perl -le 'pop @INC if $INC[-1] eq
> ".";
> do "./eg.pl";'
> hello


Yes. The same goes for require since as best I can tell it's the same underlying code. Is this a problem?

Todd


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=127810

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