summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAristotle Pagaltzis <pagaltzis@gmx.de>2016-10-12 12:15:06 +0200
committerSteve Hay <steve.m.hay@googlemail.com>2016-10-12 13:00:47 +0100
commit560e9eed36e28cd67ee5166736bd048f2e6d7a08 (patch)
tree0fbf4f1946045a9779b327fa7a25daefd645d1fc
parent990e80c153251695558491b553d71392aa17ca0d (diff)
downloadperl-560e9eed36e28cd67ee5166736bd048f2e6d7a08.tar.gz
revert base.pm incdot test change and fix properly
(cherry picked from commit 72be9a047675de9450eb7a492c222490c1aef5e7)
-rw-r--r--dist/base/lib/base.pm3
-rw-r--r--dist/base/t/incdot.t2
2 files changed, 3 insertions, 2 deletions
diff --git a/dist/base/lib/base.pm b/dist/base/lib/base.pm
index c919ac1c73..1b318b6854 100644
--- a/dist/base/lib/base.pm
+++ b/dist/base/lib/base.pm
@@ -119,11 +119,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 e0619a6d4c..1619492250 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\).\)/,