Skip to content

Commit

Permalink
perl5db.pl: Fix regex in cmd_a allowing short actions
Browse files Browse the repository at this point in the history
The regex pattern in the `a` command was updated from `(\S.+)` to
`(\S.*)` to correctly handle short actions, including single-character
expressions after the line number.

Signed-off-by: Sergei Zhmylev <[email protected]>
  • Loading branch information
zhmylove committed Jan 15, 2025
1 parent 7a1c156 commit 52b2c5e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,8 @@ Scott Wiersdorf <[email protected]> [email protected] <[email protected]>
Sean Davis <[email protected]> Sean Davis <[email protected]>
Sebastian Schmidt <[email protected]> <[email protected]>
Sebastian Schmidt <[email protected]> [email protected] <[email protected]>
Sergey Zhmylove <[email protected]> zhmylove <[email protected]>
Sergei Zhmylev <[email protected]> Sergey Zhmylove <[email protected]>
Sergei Zhmylev <[email protected]> zhmylove <[email protected]>
Shawn M Moore <[email protected]> Shawn M Moore <[email protected]>
Shawn M Moore <[email protected]> Shawn M Moore <[email protected]>
Shigeya Suzuki <[email protected]> Shigeya Suzuki <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -1272,11 +1272,11 @@ Sebastian Schmidt <[email protected]>
Sebastian Steinlechner <[email protected]>
Sebastian Wittmeier <[email protected]>
Sebastien Barre <[email protected]>
Sergei Zhmylev <[email protected]>
Sergey Alekseev <[email protected]>
Sergey Aleynikov <[email protected]>
Sergey Poznyakoff <[email protected]>
Sergey Skvortsov
Sergey Zhmylove <[email protected]>
Sergiy Borodych <[email protected]>
Sevan Janiyan <[email protected]>
Shawn <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions lib/perl5db.pl
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ BEGIN
use vars qw($VERSION $header);

# bump to X.XX in blead, only use X.XX_XX in maint
$VERSION = '1.81';
$VERSION = '1.82';

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

Expand Down Expand Up @@ -4798,7 +4798,7 @@ sub cmd_a {
$line =~ s/\A\./$dbline/;

# Should be a line number followed by an expression.
if ( my ($lineno, $expr) = $line =~ /^\s*(\d*)\s*(\S.+)/ ) {
if ( my ($lineno, $expr) = $line =~ /^\s*(\d*)\s*(\S.*)/ ) {

if (! length($lineno)) {
$lineno = $dbline;
Expand Down Expand Up @@ -4826,7 +4826,7 @@ sub cmd_a {
_set_breakpoint_enabled_status($filename, $lineno, 1);
}
} ## end if (length $expr)
} ## end if ($line =~ /^\s*(\d*)\s*(\S.+)/)
} ## end if ($line =~ /^\s*(\d*)\s*(\S.*)/)
else {

# Syntax wrong.
Expand Down

0 comments on commit 52b2c5e

Please sign in to comment.