From eeb7da9694a57d2d991b069ad844cc4a5c7ed534 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Tue, 2 Oct 2012 17:47:27 +0200 Subject: [PATCH] [perl5db] Refactoring. --- lib/perl5db.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 79cba4d..10c38e9 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -2069,7 +2069,7 @@ the new command. This is faster, but perhaps a bit more convoluted. # Handle continued commands (ending with \): if ($cmd =~ s/\\\z/\n/) { - $cmd .= &readline(" cont: "); + $cmd .= DB::readline(" cont: "); redo CMD; } @@ -2085,9 +2085,13 @@ it up. =cut # Empty input means repeat the last command. - $cmd =~ /^$/ && ( $cmd = $laststep ); + if ($cmd eq '') { + $cmd = $laststep; + } chomp($cmd); # get rid of the annoying extra newline - push( @hist, $cmd ) if length($cmd) > 1; + if (length($cmd) >= 2) { + push( @hist, $cmd ); + } push( @truehist, $cmd ); share(@hist); share(@truehist); -- 2.7.4