summaryrefslogtreecommitdiff
path: root/lib/perl5db.pl
diff options
context:
space:
mode:
authorSmylers <Smylers@stripey.com>2017-09-06 12:32:09 +0100
committerAaron Crane <arc@cpan.org>2017-09-30 17:29:59 +0100
commit7fdd4f080863703d44282c6988834455d1290405 (patch)
tree893147eba4b8db14636e1622952b75c987318ed2 /lib/perl5db.pl
parent54441887138b19f99225ea1c9caf2602ff2083ab (diff)
downloadperl-7fdd4f080863703d44282c6988834455d1290405.tar.gz
Debugger cmds not requiring spaces
Make debugger commands like these work again, not requiring a space between a single-letter command and a following argument which starts with punctuation: p$^V x@ARGV x\@ARGV x\%INC Regressions were in d478d7a0 and 8f144dfc.
Diffstat (limited to 'lib/perl5db.pl')
-rw-r--r--lib/perl5db.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 265b4441f3..d0c707e829 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -529,7 +529,7 @@ BEGIN {
use vars qw($VERSION $header);
# bump to X.XX in blead, only use X.XX_XX in maint
-$VERSION = '1.51';
+$VERSION = '1.52';
$header = "perl5db.pl version $VERSION";
@@ -1871,7 +1871,10 @@ sub _DB__trim_command_and_return_first_component {
$cmd =~ s/\A\s+//s; # trim annoying leading whitespace
$cmd =~ s/\s+\z//s; # trim annoying trailing whitespace
- my ($verb, $args) = $cmd =~ m{\A(\S*)\s*(.*)}s;
+ # A single-character debugger command can be immediately followed by its
+ # argument if they aren't both alphanumeric; otherwise require space
+ # between commands and arguments:
+ my ($verb, $args) = $cmd =~ m{\A(.\b|\S*)\s*(.*)}s;
$obj->cmd_verb($verb);
$obj->cmd_args($args);