In perl.git, the branch maint-5.22 has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/990e80c153251695558491b553d71392aa17ca0d?hp=5789eb3fb3aa682a239a44110065a6be33734ef0>

- Log -----------------------------------------------------------------
commit 990e80c153251695558491b553d71392aa17ca0d
Author: Steve Hay <steve.m....@googlemail.com>
Date:   Wed Oct 12 09:15:05 2016 +0100

    Regen customized.dat for base.pm changes

M       t/porting/customized.dat

commit 9747e677cf1a7dbd8fde344b5ab6b3dd5766bf01
Author: Steve Hay <steve.m....@googlemail.com>
Date:   Wed Oct 12 08:28:04 2016 +0100

    Bump Module-CoreList $VERSION a bit

M       dist/Module-CoreList/Changes
M       dist/Module-CoreList/lib/Module/CoreList.pm
M       dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
M       dist/Module-CoreList/lib/Module/CoreList/Utils.pm
M       pod/perldelta.pod

commit 6ee385e514e057ac876a4fbea6bcfebeb5ad7efa
Author: Steve Hay <steve.m....@googlemail.com>
Date:   Wed Oct 12 08:19:52 2016 +0100

    Update MANIFEST for previous commit

M       MANIFEST

commit 5d8239256e461c077b28d825d18f71242fe53d44
Author: Aristotle Pagaltzis <pagalt...@gmx.de>
Date:   Tue Oct 11 18:33:59 2016 +0200

    try to minimise fallout of base @INC fiddling
    
    (cherry picked from commit 6749a6283459e02074ca1e4c961f390ba5fe0083)

M       dist/base/lib/base.pm
M       dist/base/t/incdot.t
A       dist/base/t/incmodified-vs-incdot.t
A       dist/base/t/lib/BaseIncDoubleExtender.pm
A       dist/base/t/lib/BaseIncExtender.pm
-----------------------------------------------------------------------

Summary of changes:
 MANIFEST                                           |  3 +++
 dist/Module-CoreList/Changes                       |  2 +-
 dist/Module-CoreList/lib/Module/CoreList.pm        |  8 +++----
 .../lib/Module/CoreList/TieHashDelta.pm            |  2 +-
 dist/Module-CoreList/lib/Module/CoreList/Utils.pm  |  2 +-
 dist/base/lib/base.pm                              | 12 +++++++---
 dist/base/t/incdot.t                               |  2 +-
 dist/base/t/incmodified-vs-incdot.t                | 27 ++++++++++++++++++++++
 dist/base/t/lib/BaseIncDoubleExtender.pm           |  9 ++++++++
 dist/base/t/lib/BaseIncExtender.pm                 |  7 ++++++
 pod/perldelta.pod                                  |  2 +-
 t/porting/customized.dat                           |  2 +-
 12 files changed, 65 insertions(+), 13 deletions(-)
 create mode 100644 dist/base/t/incmodified-vs-incdot.t
 create mode 100644 dist/base/t/lib/BaseIncDoubleExtender.pm
 create mode 100644 dist/base/t/lib/BaseIncExtender.pm

diff --git a/MANIFEST b/MANIFEST
index 955cfd6..05a0065 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2893,7 +2893,10 @@ 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/fields.t           See if fields work
 dist/base/t/incdot.t           Test how base.pm handles '.' in @INC
+dist/base/t/incmodified-vs-incdot.t            Test base.pm's @INC fiddling
 dist/base/t/isa.t              See if base's behaviour doesn't change
+dist/base/t/lib/BaseIncDoubleExtender.pm       Test module for base.pm
+dist/base/t/lib/BaseIncExtender.pm             Test module for base.pm
 dist/base/t/lib/Broken.pm      Test module for base.pm
 dist/base/t/lib/Dummy.pm       Test module for base.pm
 dist/base/t/lib/HasSigDie.pm   Module for testing base.pm
diff --git a/dist/Module-CoreList/Changes b/dist/Module-CoreList/Changes
index c2f1791..231ab47 100644
--- a/dist/Module-CoreList/Changes
+++ b/dist/Module-CoreList/Changes
@@ -1,4 +1,4 @@
-5.20160903_22
+5.20161019_22
   - Updated for v5.22.3
 
 5.20160920
diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm 
b/dist/Module-CoreList/lib/Module/CoreList.pm
index e83ccbe..256b5bd 100644
--- a/dist/Module-CoreList/lib/Module/CoreList.pm
+++ b/dist/Module-CoreList/lib/Module/CoreList.pm
@@ -4,7 +4,7 @@ use vars qw/$VERSION %released %version %families %upstream
            %bug_tracker %deprecated %delta/;
 use Module::CoreList::TieHashDelta;
 use version;
-$VERSION = '5.20160903_22';
+$VERSION = '5.20161019_22';
 
 sub _released_order {   # Sort helper, to make '?' sort after everything else
     (substr($released{$a}, 0, 1) eq "?")
@@ -13251,9 +13251,9 @@ for my $version ( sort { $a <=> $b } keys %released ) {
             'Locale::Maketext'      => '1.26_01',
             'Locale::Maketext::Simple'=> '0.21_01',
             'Memoize'               => '1.03_01',
-            'Module::CoreList'      => '5.20160903_22',
-            'Module::CoreList::TieHashDelta'=> '5.20160903_22',
-            'Module::CoreList::Utils'=> '5.20160903_22',
+            'Module::CoreList'      => '5.20161019_22',
+            'Module::CoreList::TieHashDelta'=> '5.20161019_22',
+            'Module::CoreList::Utils'=> '5.20161019_22',
             'Module::Metadata::corpus::BOMTest::UTF16BE'=> undef,
             'Module::Metadata::corpus::BOMTest::UTF16LE'=> undef,
             'Module::Metadata::corpus::BOMTest::UTF8'=> '1',
diff --git a/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm 
b/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
index 7eac383..935b297 100644
--- a/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
+++ b/dist/Module-CoreList/lib/Module/CoreList/TieHashDelta.pm
@@ -3,7 +3,7 @@ package Module::CoreList::TieHashDelta;
 use strict;
 use vars qw($VERSION);
 
-$VERSION = '5.20160903_22';
+$VERSION = '5.20161019_22';
 
 sub TIEHASH {
     my ($class, $changed, $removed, $parent) = @_;
diff --git a/dist/Module-CoreList/lib/Module/CoreList/Utils.pm 
b/dist/Module-CoreList/lib/Module/CoreList/Utils.pm
index 560d31b..5b2693b 100644
--- a/dist/Module-CoreList/lib/Module/CoreList/Utils.pm
+++ b/dist/Module-CoreList/lib/Module/CoreList/Utils.pm
@@ -6,7 +6,7 @@ use vars qw[$VERSION %utilities];
 use Module::CoreList;
 use Module::CoreList::TieHashDelta;
 
-$VERSION = '5.20160903_22';
+$VERSION = '5.20161019_22';
 
 sub utilities {
     my $perl = shift;
diff --git a/dist/base/lib/base.pm b/dist/base/lib/base.pm
index 1aa814b..c919ac1 100644
--- a/dist/base/lib/base.pm
+++ b/dist/base/lib/base.pm
@@ -5,6 +5,12 @@ use vars qw($VERSION);
 $VERSION = '2.22_01';
 $VERSION = eval $VERSION;
 
+# simplest way to avoid indexing of the package: no package statement
+sub base::__inc_scope_guard::DESTROY {
+       my $noop = $_[0][0];
+       ref $_ and $_ == $noop and $_ = '.' for @INC;
+}
+
 # constant.pm is slow
 sub SUCCESS () { 1 }
 
@@ -90,15 +96,15 @@ sub import {
 
         next if grep $_->isa($base), ($inheritor, @bases);
 
-        # Following blocks help isolate $SIG{__DIE__} changes
+        # Following blocks help isolate $SIG{__DIE__} and @INC changes
         {
             my $sigdie;
             {
                 local $SIG{__DIE__};
                 my $fn = _module_to_filename($base);
-                local @INC = @INC;
-                pop @INC if my $dotty = $INC[-1] eq '.';
+                my $dotty = $INC[-1] eq '.' && ( $INC[-1] = sub {()} );
                 eval {
+                    my $redotty = $dotty && bless [ $dotty ], 
'base::__inc_scope_guard';
                     require $fn
                 };
                 # Only ignore "Can't locate" errors from our eval require.
diff --git a/dist/base/t/incdot.t b/dist/base/t/incdot.t
index 1619492..e0619a6 100644
--- a/dist/base/t/incdot.t
+++ b/dist/base/t/incdot.t
@@ -8,7 +8,7 @@ use Test::More tests => 2;
 
 if ($INC[-1] ne '.') { push @INC, '.' }
 
-my $inc = quotemeta "@INC[0..$#INC-1]";
+my $inc = quotemeta "@INC";
 
 eval { 'base'->import("foo") };
 like $@, qr/\@INC contains: $inc\).\)/,
diff --git a/dist/base/t/incmodified-vs-incdot.t 
b/dist/base/t/incmodified-vs-incdot.t
new file mode 100644
index 0000000..a5288e8
--- /dev/null
+++ b/dist/base/t/incmodified-vs-incdot.t
@@ -0,0 +1,27 @@
+#!/usr/bin/perl -w
+
+use strict;
+use Test::More tests => 10;  # one test is in each BaseInc* itself
+
+use lib 't/lib';
+
+# make it look like an older perl
+BEGIN { push @INC, '.' if $INC[-1] ne '.' }
+
+use base 'BaseIncExtender';
+
+BEGIN {
+    is $INC[0], 't/lib/blahblah', 'modules loaded by base can prepend entries 
to @INC';
+    is $INC[1], 't/lib', 'previously prepended additional @INC entry remains';
+    is $INC[-1], '.', 'dot still at end @INC after using base';
+}
+
+use base 'BaseIncDoubleExtender';
+
+BEGIN {
+    is $INC[0], 't/lib/blahdeblah', 'modules loaded by base can prepend 
entries to @INC';
+    is $INC[1], 't/lib/blahblah', 'previously prepended additional @INC entry 
remains';
+    is $INC[2], 't/lib', 'previously prepended additional @INC entry remains';
+    is $INC[-2], '.', 'dot still at previous end of @INC after using base';
+    is $INC[-1], 't/lib/on-end', 'modules loaded by base can append entries to 
@INC';
+}
diff --git a/dist/base/t/lib/BaseIncDoubleExtender.pm 
b/dist/base/t/lib/BaseIncDoubleExtender.pm
new file mode 100644
index 0000000..455c5de
--- /dev/null
+++ b/dist/base/t/lib/BaseIncDoubleExtender.pm
@@ -0,0 +1,9 @@
+package BaseIncDoubleExtender;
+
+BEGIN { ::ok( $INC[-1] ne '.', 'no trailing dot in @INC during module load 
from base' ) }
+
+use lib 't/lib/blahdeblah';
+
+push @INC, 't/lib/on-end';
+
+1;
diff --git a/dist/base/t/lib/BaseIncExtender.pm 
b/dist/base/t/lib/BaseIncExtender.pm
new file mode 100644
index 0000000..3b693ad
--- /dev/null
+++ b/dist/base/t/lib/BaseIncExtender.pm
@@ -0,0 +1,7 @@
+package BaseIncExtender;
+
+BEGIN { ::ok( $INC[-1] ne '.', 'no trailing dot in @INC during module load 
from base' ) }
+
+use lib 't/lib/blahblah';
+
+1;
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index b78a893..11388d9 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -195,7 +195,7 @@ L<Memoize> has been upgraded from version 1.03 to 1.03_01.
 
 =item *
 
-L<Module::CoreList> has been upgraded from version 5.20160429 to 5.20160903_22.
+L<Module::CoreList> has been upgraded from version 5.20160429 to 5.20161019_22.
 
 =item *
 
diff --git a/t/porting/customized.dat b/t/porting/customized.dat
index 1059f30..7990b63 100644
--- a/t/porting/customized.dat
+++ b/t/porting/customized.dat
@@ -150,7 +150,7 @@ Win32API::File cpan/Win32API-File/Makefile.PL 
605d0aee31aebe84a99408f9ab5f644db5
 Win32API::File cpan/Win32API-File/t/file.t 
124e64aa77e755235eb297644a87fac5388d3d78
 Win32API::File cpan/Win32API-File/t/tie.t 
712ea7edd0cc805ce1c0b8172c01b03dd19b583d
 Win32API::File cpan/Win32API-File/typemap 
24bff088babeadac0873e8df390d1666d9d9db4a
-base dist/base/lib/base.pm 6da574d6e0a807f481957817c7680d0cd27832db
+base dist/base/lib/base.pm 8f00b44549032221308073dc0474cb1fd47be271
 libnet cpan/libnet/lib/Net/Cmd.pm 4a9f6e4501549a2d7a04fbf5f9e27ab0c00976f2
 libnet cpan/libnet/lib/Net/Config.pm dfa96dcd5a459f9f39e5ca513cefc82b8178520f
 libnet cpan/libnet/lib/Net/Domain.pm 090c8c06e210102dcf25e6820c6b43b5464ec49a

--
Perl5 Master Repository

Reply via email to