summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjkahrman <jkahrman@users.noreply.github.com>2020-04-16 02:00:04 -0400
committerTony Cook <tony@develop-help.com>2020-12-09 09:20:36 +1100
commit0e91c879f0c0c46aea851b8857cf5a4ad21a6c22 (patch)
treeb99e39e6dade012595f87f332d8ca77235bfd64b /lib
parentf4ed6d050b26d63e5dae73878c2b2f13757b8afe (diff)
downloadperl-0e91c879f0c0c46aea851b8857cf5a4ad21a6c22.tar.gz
Allow debugger aliases that start with '-' and '.'
Since the '.' and '-' commands don't take any arguments and don't run if any are provided, don't treat commands starting with these characters as the single commands '.' and '-'. Restores behavior that existed prior to https://github.com/Perl/perl5/commit/7fdd4f080863703d44282c6988834455d129040 (v5.27) at least back to v5.8.8 https://github.com/Perl/perl5/commit/7fdd4f080863703d44282c6988834455d129040
Diffstat (limited to 'lib')
-rw-r--r--lib/perl5db.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 69890ef4ae..365649e1d1 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -1878,7 +1878,7 @@ sub _DB__trim_command_and_return_first_component {
# 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;
+ my ($verb, $args) = $cmd =~ m{\A([^\.-]\b|\S*)\s*(.*)}s;
$obj->cmd_verb($verb);
$obj->cmd_args($args);