In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/939e7f268559d7c80860c4e1a519e0c25d84f793?hp=772973e0724bdb6a9124827cd75fc2db56e5a443>

- Log -----------------------------------------------------------------
commit 939e7f268559d7c80860c4e1a519e0c25d84f793
Author: David Mitchell <[email protected]>
Date:   Fri Mar 24 08:48:32 2017 +0000

    INSTALL: add entry for -Ddefault_inc_excludes_dot

M       INSTALL

commit 2250cd05d3965ba397f971e2e22e2f1e16e0b1de
Author: David Mitchell <[email protected]>
Date:   Fri Mar 24 08:30:26 2017 +0000

    bump base.pm $VERSION and un-CUSTOMISE
    
    follow-up to the previous commit's reverting of base.pm @INC changes.

M       Porting/Maintainers.pl
M       dist/base/lib/base.pm
M       t/porting/customized.dat

commit 6ee05a9b9195a324347204414de1405b2b0771e3
Author: David Mitchell <[email protected]>
Date:   Fri Mar 24 08:10:12 2017 +0000

    Revert base.pm's dot-in-INC changes.
    
    This reverts:
        458470f62360040dcd4b5a55c8ba07503e1af5fc
        362f3f748cb84934a072fadbfb8b51090e2f9afe
        bca552795994a553e07b38a6f82a233533919926
    and the base.pm part of
        8901ddee94b1bc3764b4278d1cb26bed30bc2605
    
    This commit removes all the recent stuff that made base.pm localise
    @INC and remove a trailing '.'.
    
    This is because perl 5.26.0 will be released with  '.' in @INC disabled by
    default.
    
    See RT #128769.

M       MANIFEST
M       dist/base/lib/base.pm
D       dist/base/t/incdot.t
-----------------------------------------------------------------------

Summary of changes:
 INSTALL                  | 10 ++++++++++
 MANIFEST                 |  1 -
 Porting/Maintainers.pl   |  4 ----
 dist/base/lib/base.pm    | 23 +++--------------------
 dist/base/t/incdot.t     | 19 -------------------
 t/porting/customized.dat |  1 -
 6 files changed, 13 insertions(+), 45 deletions(-)
 delete mode 100644 dist/base/t/incdot.t

diff --git a/INSTALL b/INSTALL
index 2b78d4bb0b..6ff0ebe676 100644
--- a/INSTALL
+++ b/INSTALL
@@ -740,6 +740,16 @@ present, at run time.  Of course, you can still search 
other @INC
 directories ahead of those in APPLLIB_EXP by using any of the standard
 run-time methods: $PERLLIB, $PERL5LIB, -I, use lib, etc.
 
+=item default_inc_excludes_dot
+
+Since version 5.26.0, default perl builds no longer includes C<'.'> as the
+last element of @INC. The old behaviour can restored using 
+
+       Configure -Ddefault_inc_excludes_dot=n
+
+Note that this is likely to make programs run under such a perl
+interpreter less secure.
+
 =item usesitecustomize
 
 Run-time customization of @INC can be enabled with:
diff --git a/MANIFEST b/MANIFEST
index c7a4dd6074..185766cbb5 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3234,7 +3234,6 @@ dist/base/t/fields.t              See if fields work
 dist/base/t/fields-5_6_0.t     See if fields work
 dist/base/t/fields-5_8_0.t     See if fields work
 dist/base/t/fields-base.t      See if fields work
-dist/base/t/incdot.t           Test how base.pm handles '.' in @INC
 dist/base/t/isa.t              See if base's behaviour doesn't change
 dist/base/t/lib/Broken.pm      Test module for base.pm
 dist/base/t/lib/Dummy.pm       Test module for base.pm
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 276358051d..0037f8be6f 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -181,10 +181,6 @@ use File::Glob qw(:case);
     'base' => {
         'DISTRIBUTION' => 'RJBS/base-2.23.tar.gz',
         'FILES'        => q[dist/base],
-        'CUSTOMIZED'   => [
-            # https://rt.perl.org/Ticket/Display.html?id=127834
-            qw( lib/base.pm )
-        ],
     },
 
     'bignum' => {
diff --git a/dist/base/lib/base.pm b/dist/base/lib/base.pm
index 38c91c731c..8bc332e2dd 100644
--- a/dist/base/lib/base.pm
+++ b/dist/base/lib/base.pm
@@ -3,7 +3,7 @@ package base;
 
 use strict 'vars';
 use vars qw($VERSION);
-$VERSION = '2.24';
+$VERSION = '2.25';
 $VERSION =~ tr/_//d;
 
 # constant.pm is slow
@@ -97,11 +97,7 @@ sub import {
             {
                 local $SIG{__DIE__};
                 my $fn = _module_to_filename($base);
-                local @INC = @INC;
-                pop @INC if my $dotty = $INC[-1] eq '.';
-                eval {
-                    require $fn
-                };
+                eval { require $fn };
                 # Only ignore "Can't locate" errors from our eval require.
                 # Other fatal errors (syntax etc) must be reported.
                 #
@@ -115,24 +111,11 @@ sub import {
                 unless (%{"$base\::"}) {
                     require Carp;
                     local $" = " ";
-                    my $e = <<ERROR;
+                    Carp::croak(<<ERROR);
 Base class package "$base" is empty.
     (Perhaps you need to 'use' the module which defines that package first,
     or make that module available in \@INC (\@INC contains: @INC).
 ERROR
-                    if ($dotty && -e $fn) {
-                        $e .= <<ERROS;
-    The file $fn does exist in the current directory.  But note
-    that base.pm, when loading a module, now ignores the current working
-    directory if it is the last entry in \@INC.  If your software worked on
-    previous versions of Perl, the best solution is to use FindBin to
-    detect the path properly and to add that path to \@INC.  As a last
-    resort, you can re-enable looking in the current working directory by
-    adding "use lib '.'" to your code.
-ERROS
-                    }
-                    $e =~ s/\n\z/)\n/;
-                    Carp::croak($e);
                 }
                 $sigdie = $SIG{__DIE__} || undef;
             }
diff --git a/dist/base/t/incdot.t b/dist/base/t/incdot.t
deleted file mode 100644
index 1619492250..0000000000
--- a/dist/base/t/incdot.t
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-
-use base ();
-
-use Test::More tests => 2;
-
-if ($INC[-1] ne '.') { push @INC, '.' }
-
-my $inc = quotemeta "@INC[0..$#INC-1]";
-
-eval { 'base'->import("foo") };
-like $@, qr/\@INC contains: $inc\).\)/,
-    'Error does not list final dot in @INC (or mention use lib)';
-eval { 'base'->import('t::lib::Dummy') };
-like $@, qr<\@INC contains: $inc\).\n(?x:
-           )    The file t/lib/Dummy\.pm does exist in the current direct>,
-    'special cur dir message for existing files in . that are ignored';
diff --git a/t/porting/customized.dat b/t/porting/customized.dat
index eb38b270d6..5014b3e210 100644
--- a/t/porting/customized.dat
+++ b/t/porting/customized.dat
@@ -80,5 +80,4 @@ Test::Harness 
cpan/Test-Harness/lib/TAP/Parser/YAMLish/Writer.pm bf1fbfff9720330
 Test::Harness cpan/Test-Harness/lib/Test/Harness.pm 
da2d76ba673372da129060c9d0adb8cf0d91f9f7
 Test::Simple cpan/Test-Simple/t/Test2/modules/IPC/Driver/Files.t 
59648b5745fda06177d81c2c21f55b09f6e129bb
 autodie cpan/autodie/t/mkdir.t 9e70d2282a3cc7d76a78bf8144fccba20fb37dac
-base dist/base/lib/base.pm 9575442273694d41c8e86cb1d86fa1935a07c8a8
 version cpan/version/lib/version.pm a032a751524bdd07a93c945d2a1703abe7ad8ef0

--
Perl5 Master Repository

Reply via email to