summaryrefslogtreecommitdiff
path: root/lib/perl5db.pl
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2016-06-23 10:41:48 +1000
committerTony Cook <tony@develop-help.com>2016-07-26 15:36:32 +1000
commitdb79bf92c5e2c1063f78663fd03bcb0965c558e3 (patch)
treee7cbe9e5d5642831197157d2a494f8336c330503 /lib/perl5db.pl
parentd8f1b4d05e6f0f620663f48949104f2f27883dd8 (diff)
downloadperl-db79bf92c5e2c1063f78663fd03bcb0965c558e3.tar.gz
perl5db.pl: ensure PadWalker is loaded from standard paths
Diffstat (limited to 'lib/perl5db.pl')
-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);