From a47c73fc11a9b8f844ed64e461ff2c2e5b3fb95e Mon Sep 17 00:00:00 2001 From: Vincent Pit Date: Mon, 25 Jun 2012 15:56:27 +0200 Subject: [PATCH] Fix restarting a debugging session opened for a one-liner It was broken by 'use strict' as well. --- lib/perl5db.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 6e08d59..d914154 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -9016,8 +9016,9 @@ sub restart { # the 'require perl5db.pl;' line), and add them back on # to the command line to be executed. if ( $0 eq '-e' ) { - for ( 1 .. $#{'::_<-e'} ) { # The first line is PERL5DB - chomp( $cl = ${'::_<-e'}[$_] ); + my $lines = *{$main::{'_<-e'}}{ARRAY}; + for ( 1 .. $#$lines ) { # The first line is PERL5DB + chomp( $cl = $lines->[$_] ); push @script, '-e', $cl; } } ## end if ($0 eq '-e') -- 2.7.4