In perl.git, the branch ap/baseincguard-old has been updated <http://perl5.git.perl.org/perl.git/commitdiff/9ed82a594a10c1df3bd03e19bfd149b3e7a0a704?hp=02210d932382bb8b215cd476c6229ed7e4ee7333>
discards 02210d932382bb8b215cd476c6229ed7e4ee7333 (commit) - Log ----------------------------------------------------------------- commit 9ed82a594a10c1df3bd03e19bfd149b3e7a0a704 Author: Aristotle Pagaltzis <[email protected]> Date: Thu Oct 20 17:05:45 2016 +0200 base: only hide $INC[-1] . from optional loads ----------------------------------------------------------------------- Summary of changes: dist/base/lib/base.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/base/lib/base.pm b/dist/base/lib/base.pm index 0a6d282..d841947 100644 --- a/dist/base/lib/base.pm +++ b/dist/base/lib/base.pm @@ -127,10 +127,10 @@ Base class package "$base" is empty. or make that module available in \@INC (\@INC contains: @INC). ERROR } - elsif (!$success && $INC[-1] eq '.' && grep -e && !( -d _ || -b _ ), $fn, $fn.'c') { + elsif (!$success && $INC[-1] eq '.' && (my @fn = grep -e && !( -d _ || -b _ ), $fn.'c', $fn)) { require Carp; Carp::croak(<<ERROR); -Base class package "$base" is not empty but "$fn" exists in the current directory. +Base class package "$base" is not empty but "$fn[0]" exists in the current directory. To help avoid security issues, base.pm now refuses to load optional modules from the current working directory when it is the last entry in \@INC. If your software worked on previous versions of Perl, the best solution -- Perl5 Master Repository
