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

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

Thread Previous | Thread Next
From:
Matt S Trout
Date:
October 22, 2016 15:24
Subject:
[perl #127810] Provide -Dfortify_inc Configure option to remove.from @INC
Message ID:
20161022152359.GJ31313@newagaton.scsys.co.uk
> Yes. The same goes for require since as best I can tell it's the same underlying code. Is this a problem?

I think it is.

'require' is meant to load modules, so the normal use case is walking @INC,
so its behaviour is (relatively) expected here.

'do' is documented as "largely like: eval `cat stat.pl`" and generally used
as such - the fact that its support for files in the current working
directory comes via .-in-@INC is, I think, an implementation detail.

So having do() suddenly fail to DWIM for its most common and documented
purpose is going to be intensely confusing, especially given its common
use for e.g. relative loading of config files in Olde CGI Scripts.

I'm not sure what, if anything, can be done to rescue that, but it seems
like a much bigger POLS violation than the rest of the effects, and at
least we should explicitly consider the impact and whether there's some way
to ameliorate it.

-- 
Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue

http://shadowcat.co.uk/blog/matt-s-trout/   http://twitter.com/shadowcat_mst/

Email me now on mst (at) shadowcat.co.uk and let's chat about how our CPAN
commercial support, training and consultancy packages could help your team.

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