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:55 +0100
commitb6bff9ec019a98880c6310e7132439eccd24b72b (patch)
tree4adb0f613b332d225c292d0247623a4275854f02
parent30222baf8c8b4c9785e63829370d1220e1d1a09f (diff)
downloadperl-b6bff9ec019a98880c6310e7132439eccd24b72b.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 d7193a6c8a..40c1ffde9a 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 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\).\)/,