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
Matt S Trout
October 22, 2016 15:24
[perl #127810] Provide -Dfortify_inc Configure option to remove.from @INC
Message ID:
> 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`" 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

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

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