In perl.git, the branch ap/baseincguard has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/72be9a047675de9450eb7a492c222490c1aef5e7?hp=6749a6283459e02074ca1e4c961f390ba5fe0083>

- Log -----------------------------------------------------------------
commit 72be9a047675de9450eb7a492c222490c1aef5e7
Author: Aristotle Pagaltzis <pagalt...@gmx.de>
Date:   Wed Oct 12 12:15:06 2016 +0200

    revert base.pm incdot test change and fix properly
-----------------------------------------------------------------------

Summary of changes:
 dist/base/lib/base.pm | 3 ++-
 dist/base/t/incdot.t  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dist/base/lib/base.pm b/dist/base/lib/base.pm
index f3a95e8..1c751eb 100644
--- a/dist/base/lib/base.pm
+++ b/dist/base/lib/base.pm
@@ -120,11 +120,12 @@ sub import {
                           || $@ =~ /Compilation failed in require at .* line 
[0-9]+(?:, <[^>]*> (?:line|chunk) [0-9]+)?\.\n\z/;
                 unless (%{"$base\::"}) {
                     require Carp;
+                    my @inc = $dotty ? @INC[0..$#INC-1] : @INC;
                     local $" = " ";
                     my $e = <<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).
+    or make that module available in \@INC (\@INC contains: @inc).
 ERROR
                     if ($dotty && -e $fn) {
                         $e .= <<ERROS;
diff --git a/dist/base/t/incdot.t b/dist/base/t/incdot.t
index e0619a6..1619492 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";
+my $inc = quotemeta "@INC[0..$#INC-1]";
 
 eval { 'base'->import("foo") };
 like $@, qr/\@INC contains: $inc\).\)/,

--
Perl5 Master Repository

Reply via email to