summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2016-06-23 10:41:48 +1000
committerSteve Hay <steve.m.hay@googlemail.com>2016-07-25 10:12:18 +0100
commit4d4c723fee1dae2e42ee6c50763f11aacea54c13 (patch)
tree3e975a2edb1419b25ee32f1ac5925d79bd3fc35a
parent9abd9bfebf88e1f6366da8214e844447210acf40 (diff)
downloadperl-4d4c723fee1dae2e42ee6c50763f11aacea54c13.tar.gz
perl5db.pl: ensure PadWalker is loaded from standard paths
-rw-r--r--lib/perl5db.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index f26731bacf..99566a71d5 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -1951,7 +1951,10 @@ sub _DB__handle_y_command {
= $obj->cmd_args =~ /\A(?:(\d*)\s*(.*))?\z/) {
# See if we've got the necessary support.
- if (!eval { require PadWalker; PadWalker->VERSION(0.08) }) {
+ if (!eval {
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
+ require PadWalker; PadWalker->VERSION(0.08) }) {
my $Err = $@;
_db_warn(
$Err =~ /locate/
@@ -9441,7 +9444,10 @@ if PadWalker could be loaded.
=cut
- if (not $text =~ /::/ and eval { require PadWalker } ) {
+ if (not $text =~ /::/ and eval {
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
+ require PadWalker } ) {
my $level = 1;
while (1) {
my @info = caller($level);