-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugger command regression: Now requires more spaces #13342
Comments
From @SmylersThis is a bug report for perl from smylers@stripey.com, In the Perl debugger commands written like the following used to work, p@ARGV They still work if you type a space between the command letter and the It only seems to be the single-letter debugger commands that are The error message in blead is: DB<72> x\@ARGV This is it working in v5.14.3: DB<72> x\@ARGV I haven't tried to narrow it down any further, mainly cos I don't know Flags: Site configuration information for perl 5.19.5: Configured by smylers at Wed Oct 9 17:34:57 BST 2013. Summary of my perl5 (revision 5 version 19 subversion 5) configuration: @INC for perl 5.19.5: Environment for perl 5.19.5: |
From @jkeenanOn Thu, 10 Oct 2013 11:14:24 GMT, smylers@stripey.com wrote:
I have confirmed the regression. It is still present in blead (5.27.3). However, we should first ask: Is this a bug? That is, was the fact that we once could use the 'p' and 'x' commands in the debugger without a subsequent wordspace intentional or accidental? Note: I'm not saying this should not be fixed. I simply think the question should be faced. Use of perlbrew to get various versions of perl shows roughly when the regression occurred: ##### Which means that the problem occurred roughly between these two commits: ##### commit 1799399 version bumps and perldelta for debugger depth There was a lot of work being done on the debugger during this period. The diff is large enough that I'm attaching it gzipped first. I don't know how to bisect a debugger problem. But I was able to create a branch based on perl-5.16.3 (jkeenan/120174-starting-from-5.16.3) in which I wrote some tests for the problem with passed. Those same tests, when added to a branch based on blead (5.27.3) (jkeenan/120174-starting-from-5.27.3), fail. Hence, the tests -- which, I concede, are rough, as I'm not familiar with the tests in lib/perl5db.t -- can be used as regression tests once the problem is corrected (assuming we want to correct it). Thank you very much. |
From @jkeenan120174-0001-Add-tests-for-p-and-x-commands-without-subsequent-wh.patchFrom 9cbf7940aed97cb73313c28dc2ba2fd85cc19458 Mon Sep 17 00:00:00 2001
From: James E Keenan <jkeenan@cpan.org>
Date: Sat, 2 Sep 2017 22:28:20 -0400
Subject: [PATCH] Add tests for 'p' and 'x' commands without subsequent
whitespace.
Tests pass on perl-5.16.3 but should fail (until source code is corrected) on
subsequent versions.
For: RT #120174
---
lib/perl5db.t | 86 ++++++++++++++++++++++++++++++++++++++++++++++++-
lib/perl5db/t/rt-120174 | 4 +++
2 files changed, 89 insertions(+), 1 deletion(-)
create mode 100644 lib/perl5db/t/rt-120174
diff --git a/lib/perl5db.t b/lib/perl5db.t
index a2dccc6..3d432ad 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -31,7 +31,7 @@ BEGIN {
$ENV{PERL_RL} = 'Perl'; # Suppress system Term::ReadLine::Gnu
}
-plan(123);
+plan(127);
my $rc_filename = '.perldb';
@@ -2817,6 +2817,90 @@ SKIP:
);
}
+{
+ # perl 5 RT #120174 - 'p' command
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 2',
+ 'c',
+ 'p@abc',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/1234/,
+ q/RT 120174: p command can be invoked without space after 'p'/,
+ );
+}
+
+{
+ # perl 5 RT #120174 - 'x' command on array
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 2',
+ 'c',
+ 'x@abc',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/0\s+1\n1\s+2\n2\s+3\n3\s+4/ms,
+ q/RT 120174: x command can be invoked without space after 'x' before array/,
+ );
+}
+
+{
+ # perl 5 RT #120174 - 'x' command on array ref
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 2',
+ 'c',
+ 'x\@abc',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/\s+0\s+1\n\s+1\s+2\n\s+2\s+3\n\s+3\s+4/ms,
+ q/RT 120174: x command can be invoked without space after 'x' before array ref/,
+ );
+}
+
+{
+ # perl 5 RT #120174 - 'x' command on hash ref
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 4',
+ 'c',
+ 'x\%xyz',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/\s+'alpha'\s+=>\s+'beta'\n\s+'gamma'\s+=>\s+'delta'/ms,
+ q/RT 120174: x command can be invoked without space after 'x' before hash ref/,
+ );
+}
+
END {
1 while unlink ($rc_filename, $out_fn);
}
diff --git a/lib/perl5db/t/rt-120174 b/lib/perl5db/t/rt-120174
new file mode 100644
index 0000000..c79c851
--- /dev/null
+++ b/lib/perl5db/t/rt-120174
@@ -0,0 +1,4 @@
+@abc = (1..4);
+print "hello world\n";
+%xyz = ( 'alpha' => 'beta', 'gamma' => 'delta' );
+print "goodbye world\n";
--
2.7.4
|
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Sun, 03 Sep 2017 03:02:20 GMT, jkeenan wrote: Add diff. -- |
From [Unknown Contact. See original ticket]On Sun, 03 Sep 2017 03:02:20 GMT, jkeenan wrote: Add diff. -- |
From @jkeenanOn Sun, 03 Sep 2017 03:02:20 GMT, jkeenan wrote:
I have figured out how to bisect a debugger problem. The problems with the 'x' command first appeared in this commit: ##### Add more commands to the lookup table. Inline Patchdiff --git a/lib/perl5db.pl b/lib/perl5db.pl
index c9844fd..ed34703 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -2423,7 +2423,15 @@ sub _DB__at_end_of_every_command {
# 's' is subroutine.
my %cmd_lookup =
(
- 'q' => { t => 'm', v => '_handle_q_command' },
+ '.' => { t => 's', v => \&_DB__handle_dot_command, },
+ 'f' => { t => 's', v => \&_DB__handle_f_command, },
+ 'm' => { t => 's', v => \&_DB__handle_m_command, },
+ 'q' => { t => 'm', v => '_handle_q_command', },
+ 'S' => { t => 'm', v => '_handle_S_command', },
+ 't' => { t => 'm', v => '_handle_t_command', },
+ 'x' => { t => 'm', v => '_handle_x_command', },
+ (map { $_ => { t => 'm', v => '_handle_V_command_and_X_command', }, }
+ ('X', 'V')),
);
sub DB {
@@ -2763,16 +2771,12 @@ If level is specified, set C<$trace_to_depth>.
=cut
- $obj->_handle_t_command;
-
=head4 C<S> - list subroutines matching/not matching a pattern
Walks through C<%sub>, checking to see whether or not to print the name.
=cut
- $obj->_handle_S_command;
-
=head4 C<X> - list variables in current package
Since the C<V> command actually processes this, just change this to the
@@ -2784,8 +2788,6 @@ Uses C<dumpvar.pl> to dump out the current values for selected variables.
=cut
- $obj->_handle_V_command_and_X_command;
-
=head4 C<x> - evaluate and print an expression
Hands the expression off to C<DB::eval>, setting it up to print the value
@@ -2793,22 +2795,16 @@ via C<dumpvar.pl> instead of just printing it directly.
=cut
- $obj->_handle_x_command;
-
=head4 C<m> - print methods
Just uses C<DB::methods> to determine what methods are available.
=cut
- _DB__handle_m_command($obj);
-
=head4 C<f> - switch files
=cut
- _DB__handle_f_command($obj);
-
=head4 C<.> - return to last-executed line.
We set C<$incr> to -1 to indicate that the debugger shouldn't move ahead,
@@ -2816,8 +2812,6 @@ and then we look up the line in the magical C<%dbline> hash.
=cut
- _DB__handle_dot_command($obj);
-
=head4 C<-> - back one window
We change C<$start> to be one window back; if we go back past the first line,
The changes to the 'p' command first appeared at this commit: ##### Low hanging fruit is now in %cmd_lookup. Inline Patchdiff --git a/lib/perl5db.pl b/lib/perl5db.pl
index d79be51..56b8d65 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -2425,20 +2425,32 @@ my %cmd_lookup =
(
'-' => { t => 'm', v => '_handle_dash_command', },
'.' => { t => 's', v => \&_DB__handle_dot_command, },
+ '=' => { t => 'm', v => '_handle_equal_sign_command', },
+ 'H' => { t => 'm', v => '_handle_H_command', },
'S' => { t => 'm', v => '_handle_S_command', },
'T' => { t => 'm', v => '_handle_T_command', },
+ 'W' => { t => 'm', v => '_handle_W_command', },
'c' => { t => 's', v => \&_DB__handle_c_command, },
'f' => { t => 's', v => \&_DB__handle_f_command, },
'm' => { t => 's', v => \&_DB__handle_m_command, },
'n' => { t => 'm', v => '_handle_n_command', },
+ 'p' => { t => 'm', v => '_handle_p_command', },
'q' => { t => 'm', v => '_handle_q_command', },
'r' => { t => 'm', v => '_handle_r_command', },
's' => { t => 'm', v => '_handle_s_command', },
+ 'save' => { t => 'm', v => '_handle_save_command', },
+ 'source' => { t => 'm', v => '_handle_source_command', },
't' => { t => 'm', v => '_handle_t_command', },
+ 'w' => { t => 'm', v => '_handle_w_command', },
'x' => { t => 'm', v => '_handle_x_command', },
'y' => { t => 's', v => \&_DB__handle_y_command, },
(map { $_ => { t => 'm', v => '_handle_V_command_and_X_command', }, }
('X', 'V')),
+ (map { $_ => { t => 'm', v => '_handle_enable_disable_commands', }, }
+ qw(enable disable)),
+ (map { $_ =>
+ { t => 's', v => \&_DB__handle_restart_and_rerun_commands, },
+ } qw(R rerun)),
);
sub DB {
@@ -2888,18 +2900,10 @@ Just calls C<DB::print_trace>.
Just calls C<DB::cmd_w>.
-=cut
-
- $obj->_handle_w_command;
-
=head4 C<W> - watch-expression processing.
Just calls C<DB::cmd_W>.
-=cut
-
- $obj->_handle_W_command;
-
=head4 C</> - search forward for a string in the source
We take the argument and treat it as a pattern. If it turns out to be a
@@ -2963,10 +2967,6 @@ C<DB::system> to avoid problems with C<STDIN> and C<STDOUT>.
Prints the contents of C<@hist> (if any).
-=cut
-
- $obj->_handle_H_command;
-
=head4 C<man, doc, perldoc> - look up documentation
Just calls C<runman()> to print the appropriate document.
@@ -2980,36 +2980,19 @@ Just calls C<runman()> to print the appropriate document.
Builds a C<print EXPR> expression in the C<$cmd>; this will get executed at
the bottom of the loop.
-=cut
-
- $obj->_handle_p_command;
-
=head4 C<=> - define command alias
Manipulates C<%alias> to add or list command aliases.
-=cut
-
- # = - set up a command alias.
- $obj->_handle_equal_sign_command;
-
=head4 C<source> - read commands from a file.
Opens a lexical filehandle and stacks it on C<@cmdfhs>; C<DB::readline> will
pick it up.
-=cut
-
- $obj->_handle_source_command;
-
=head4 C<enable> C<disable> - enable or disable breakpoints
This enables or disables breakpoints.
-=cut
-
- $obj->_handle_enable_disable_commands;
-
=head4 C<save> - send current history to a file
Takes the complete history, (not the shrunken version you see with C<H>),
@@ -3017,11 +3000,6 @@ and saves it to the given filename, so it can be replayed using C<source>.
Note that all C<^(save|source)>'s are commented out with a view to minimise recursion.
-=cut
-
- # save source - write commands to a file for later use
- $obj->_handle_save_command;
-
=head4 C<R> - restart
Restart the debugger session.
@@ -3030,12 +3008,6 @@ Restart the debugger session.
Return to any given position in the B<true>-history list
-=cut
-
- # R - restart execution.
- # rerun - controlled restart execution.
- _DB__handle_restart_and_rerun_commands($obj);
-
=head4 C<|, ||> - pipe output through the pager.
For C<|>, we save C<OUT> (the debugger's output filehandle) and C<STDOUT>
Thank you very much. -- |
From @SmylersOn Sat, 02 Sep 2017 20:02:20 -0700, jkeenan wrote:
Thanks, James. And for the automated tests and finding the specific
That's a fair question. I think there are three arguments in favour: 1 perl itself doesn't require a space between keywords and variable $ perl -lE "print@ARGV" one two three So it's an extra hurdle for users to have to remember that the 2 Commands typed at the debugger prompt are by definition
3 Perl has a history of retaining backwards compatibility even of So even if this weren't an intentional feature originally, it was (However, after half a decade of this being broken, people have I see from the commits you tracked this to that a bunch of single-letter Smylers |
From @LeontOn Sun, Sep 3, 2017 at 5:02 AM, James E Keenan via RT <
I can think of no reason not call this regression a bug.
This period coincides with a grant on the debugger. It's far from the only Leon |
From @shlomifHi all! On Mon, 04 Sep 2017 01:51:18 -0700
Since it was my work on refactoring and adding tests to the debugger that broke My personal inclination is to keep the regression because: 1. I feel it was an Regards, Shlomi Fish [snipped] -- Shlomi Fish http://www.shlomifish.org/ One thing I could never understand is why in Microsoft Word, it often happens |
From @jkeenanOn Tue, 05 Sep 2017 19:51:00 GMT, shlomif@shlomifish.org wrote:
Yes, ultimately it is the pumpking's decision. In this case, I hope he will perform the most difficult but most necessary function in the pumpking's role. I hope he will say, "No."
I agree. Type 'perldoc perldebug' in perl-5.16.3 -- the last production version where you could type a 'p' or an 'x' not followed by a wordspace -- and you will find that the wordspace-less version of the command is neither documented nor tested. You are correct is stating that it was an accidental misfeature.
I somewhat disagree. The former pumpking was the person who actually committed your work to blead, and all the rest of us committers had the opportunity to review your work in detail. So it's certainly not your fault alone. Since it was an accidental misfeature, restoring it to working condition should be the responsibility of those who want to restore it. And it will be *a lot more* work for them!
Will it ever! The debugger is an ugly beast, but it was uglier still before your refactoring project. We have more than a few open RT tickets concerning the debugger. I would rather have someone focus on them than on restoring this accidental misfeature.
So I hope the pumpking says, "No." Thank you very much. -- |
From @shlomifHi James and all, On Tue, 05 Sep 2017 13:59:21 -0700
I see.
Yes. I recall hearing that Linus Torvalds also once said that that was his most
Yes.
Right. Nevertheless, I did it as part of a paid grant, and so I'm also
Yes. I still volunteer to provide a fix patch if the pumpking thinks it should
Heh. :-)
I agree.
I hope so to, but it is up to him.
-- Shlomi Fish http://www.shlomifish.org/ <rjbs> sub id { my $self = shift; $json_parser_for{ $self } |
From @arcJames E Keenan via RT <perlbug-followup@perl.org> wrote:
I disagree. This change in behaviour has caused sufficient annoyance
That seems harsh. Wanting a feature (accidental or not, mis- or not)
On the contrary, fixing this regression involves making a trivial Accordingly, I've attached a patch that fixes this regression, -- |
From @arc0001-RT-120174-regression-in-single-letter-debugger-comma.patchFrom a763defe67e9e682795335b7f47260401b1069a2 Mon Sep 17 00:00:00 2001
From: Aaron Crane <arc@cpan.org>
Date: Thu, 7 Sep 2017 12:56:07 +0100
Subject: [PATCH] RT #120174: regression in single-letter debugger commands
In the 5.17.x series, the debugger started requiring a space after
single-letter commands. Fix this regression, and add a test for the
original behaviour.
---
lib/perl5db.pl | 5 +++--
lib/perl5db.t | 21 ++++++++++++++++++++-
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 265b4441f3..f9275aee00 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,8 @@ 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;
+ my ($verb, $args) = $cmd =~ m{\A(?| (\w\b) \s* (.*)
+ | (\S*) \s* (.*) )}sx;
$obj->cmd_verb($verb);
$obj->cmd_args($args);
diff --git a/lib/perl5db.t b/lib/perl5db.t
index a2dccc6fd3..d64799f7e7 100644
--- a/lib/perl5db.t
+++ b/lib/perl5db.t
@@ -31,7 +31,7 @@ BEGIN {
$ENV{PERL_RL} = 'Perl'; # Suppress system Term::ReadLine::Gnu
}
-plan(123);
+plan(124);
my $rc_filename = '.perldb';
@@ -788,6 +788,25 @@ sub _calc_trace_wrapper
"p command works.");
}
+{
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'n',
+ 'p"exp=<$exp>"',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/break-on-dot',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/^exp=<1>$/m,
+ 'RT #120174: require no space for single-letter commands',
+ );
+}
+
# Tests for x.
{
my $wrapper = DebugWrap->new(
--
2.14.1
|
From @SmylersAaron Crane via RT writes:
However, I thought I might more usefully spend time looking into what it After Jim's excellent dissection, and spotting that the diffs with the
|
From @Smylers0001-Add-tests-for-p-and-x-commands-without-subsequent-wh.patchFrom 96a4037df59f332f3cb9affdc33718e114098227 Mon Sep 17 00:00:00 2001
From: James E Keenan <jkeenan@cpan.org>
Date: Sat, 2 Sep 2017 22:28:20 -0400
Subject: [PATCH 1/2] Add tests for 'p' and 'x' commands without subsequent
whitespace.
Tests pass on perl-5.16.3 but should fail (until source code is corrected) on
subsequent versions.
For: RT #120174
---
MANIFEST | 1 +
lib/perl5db.t | 86 ++++++++++++++++++++++++++++++++++++++++++++++++-
lib/perl5db/t/rt-120174 | 4 +++
3 files changed, 90 insertions(+), 1 deletion(-)
create mode 100644 lib/perl5db/t/rt-120174
diff --git MANIFEST MANIFEST
index effc4665..9a200067 100644
--- MANIFEST
+++ MANIFEST
@@ -4604,6 +4604,7 @@ lib/perl5db/t/lvalue-bug Tests for the Perl debugger
lib/perl5db/t/MyModule.pm Tests for the Perl debugger
lib/perl5db/t/proxy-constants Tests for the Perl debugger
lib/perl5db/t/rt-104168 Tests for the Perl debugger
+lib/perl5db/t/rt-120174 Tests for the Perl debugger
lib/perl5db/t/rt-121509-restart-after-chdir Tests for the Perl debugger
lib/perl5db/t/rt-61222 Tests for the Perl debugger
lib/perl5db/t/rt-66110 Tests for the Perl debugger
diff --git lib/perl5db.t lib/perl5db.t
index a2dccc6f..3d432ad5 100644
--- lib/perl5db.t
+++ lib/perl5db.t
@@ -31,7 +31,7 @@ BEGIN {
$ENV{PERL_RL} = 'Perl'; # Suppress system Term::ReadLine::Gnu
}
-plan(123);
+plan(127);
my $rc_filename = '.perldb';
@@ -2817,6 +2817,90 @@ SKIP:
);
}
+{
+ # perl 5 RT #120174 - 'p' command
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 2',
+ 'c',
+ 'p@abc',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/1234/,
+ q/RT 120174: p command can be invoked without space after 'p'/,
+ );
+}
+
+{
+ # perl 5 RT #120174 - 'x' command on array
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 2',
+ 'c',
+ 'x@abc',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/0\s+1\n1\s+2\n2\s+3\n3\s+4/ms,
+ q/RT 120174: x command can be invoked without space after 'x' before array/,
+ );
+}
+
+{
+ # perl 5 RT #120174 - 'x' command on array ref
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 2',
+ 'c',
+ 'x\@abc',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/\s+0\s+1\n\s+1\s+2\n\s+2\s+3\n\s+3\s+4/ms,
+ q/RT 120174: x command can be invoked without space after 'x' before array ref/,
+ );
+}
+
+{
+ # perl 5 RT #120174 - 'x' command on hash ref
+ my $wrapper = DebugWrap->new(
+ {
+ cmds =>
+ [
+ 'b 4',
+ 'c',
+ 'x\%xyz',
+ 'q',
+ ],
+ prog => '../lib/perl5db/t/rt-120174',
+ }
+ );
+
+ $wrapper->contents_like(
+ qr/\s+'alpha'\s+=>\s+'beta'\n\s+'gamma'\s+=>\s+'delta'/ms,
+ q/RT 120174: x command can be invoked without space after 'x' before hash ref/,
+ );
+}
+
END {
1 while unlink ($rc_filename, $out_fn);
}
diff --git lib/perl5db/t/rt-120174 lib/perl5db/t/rt-120174
new file mode 100644
index 00000000..c79c8510
--- /dev/null
+++ lib/perl5db/t/rt-120174
@@ -0,0 +1,4 @@
+@abc = (1..4);
+print "hello world\n";
+%xyz = ( 'alpha' => 'beta', 'gamma' => 'delta' );
+print "goodbye world\n";
--
1.9.1
|
From @Smylers0002-perl-120174-Debugger-cmds-not-requiring-spaces.patchFrom ae6c2f451db98ef95c3f9b7813fd9e2eec21d29e Mon Sep 17 00:00:00 2001
From: Smylers <Smylers@stripey.com>
Date: Wed, 6 Sep 2017 12:32:09 +0100
Subject: [PATCH 2/2] [perl #120174] 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.
---
lib/perl5db.pl | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git lib/perl5db.pl lib/perl5db.pl
index 265b4441..d0c707e8 100644
--- lib/perl5db.pl
+++ 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);
--
1.9.1
|
From @SmylersI just wrote:
Then somehow only part of my message made it out of my editor window Here's what the rest of my mail should've said: After Jim's excellent bisection, and spotting that the diffs with the That turned out to be pretty much the case: the fix, which passes all Attached are patches for Jim's tests plus my fix.
Snap! Sorry; I did the work yesterday, but ran out of time to submit it then.
Ditto. I'm wondering if I could've found and fixed this 4 years ago when
Thank you! Our patches are basically the same (and that we came up with them • Your match uses /x, making it easier to read what it's doing. Mine has • I used Jim's tests; you wrote a new test. I haven't checked whether Smylers |
From @shlomifHi all, On Thu, 07 Sep 2017 07:21:53 -0700
Seeing this twist of events where two patches were provided and they are not I still think this was an accidental misfeature but don't mind it being Regards, Shlomi
-- Shlomi Fish http://www.shlomifish.org/ I come to bury Caesar, not to praise him. |
From @SmylersOn Thu, 07 Sep 2017 09:11:55 -0700, shlomif@shlomifish.org wrote:
Yay! Thanks, Shlomi.
Note the lines immediately preceding the change are: $cmd =~ s/\A\s+//s; # trim annoying leading whitespace So /^./ can't possibly be whitespace here, and as such is equivalent to Aaron's patch has /^\w\b/ instead of /^.\b/ — I chose the latter cos it Looking to see whether any such debugger commands exist, it means that =help h That doesn't work without the patch, and presumably also doesn't work The | and ! debugger commands don't seem to require a space even without Smylers |
From @xsawyerxFrom the desk of the pumpking: It is far more common for me to say "No" than "Yes," despite enjoying * This went unnoticed for a while, but now it has. Considering: I really do not see why we shouldn't fix it and move on I would be happy S. [1] And I know, I've often been quoting as though I don't. But I do On 09/07/2017 03:01 PM, Aaron Crane wrote:
|
@arc - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#120174 (status was 'resolved')
Searchable as RT120174$
The text was updated successfully, but these errors were encountered: