Skip to content

Commit 7fdd4f0

Browse files
Smylersarc
authored andcommitted
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 d478d7a and 8f144df.
1 parent 5444188 commit 7fdd4f0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/perl5db.pl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ BEGIN
529529
use vars qw($VERSION $header);
530530

531531
# bump to X.XX in blead, only use X.XX_XX in maint
532-
$VERSION = '1.51';
532+
$VERSION = '1.52';
533533

534534
$header = "perl5db.pl version $VERSION";
535535

@@ -1871,7 +1871,10 @@ sub _DB__trim_command_and_return_first_component {
18711871
$cmd =~ s/\A\s+//s; # trim annoying leading whitespace
18721872
$cmd =~ s/\s+\z//s; # trim annoying trailing whitespace
18731873

1874-
my ($verb, $args) = $cmd =~ m{\A(\S*)\s*(.*)}s;
1874+
# A single-character debugger command can be immediately followed by its
1875+
# argument if they aren't both alphanumeric; otherwise require space
1876+
# between commands and arguments:
1877+
my ($verb, $args) = $cmd =~ m{\A(.\b|\S*)\s*(.*)}s;
18751878

18761879
$obj->cmd_verb($verb);
18771880
$obj->cmd_args($args);

0 commit comments

Comments
 (0)