summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2012-11-14 10:15:37 +0200
committerTony Cook <tony@develop-help.com>2013-01-02 11:22:00 +1100
commit6694d3505e6b88fe0cdffd614a0ce88894f0d4f4 (patch)
treec4b5f0b128560112d0f380d68711985a3809b05e /lib
parentef9660c1dcf8eb606bd3dd4c98fe8d6d8838fd24 (diff)
downloadperl-6694d3505e6b88fe0cdffd614a0ce88894f0d4f4.tar.gz
[perl5db] Extract.
Diffstat (limited to 'lib')
-rw-r--r--lib/perl5db.pl18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 936ad704c1..1feb865125 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -5485,7 +5485,7 @@ sub _cmd_l_handle_var_name {
$line = "$1 $s";
# Call self recursively to really do the command.
- return cmd_l( 'l', $s );
+ return _cmd_l_main( $s );
}
sub _cmd_l_handle_subname {
@@ -5541,7 +5541,7 @@ sub _cmd_l_handle_subname {
# Call self recursively to list the range.
$line = $subrange;
- return cmd_l( 'l', $subrange );
+ return _cmd_l_main( $subrange );
} ## end if ($subrange)
# Couldn't find it.
@@ -5556,7 +5556,7 @@ sub _cmd_l_empty {
$incr = $window - 1;
# Recurse to do it.
- return cmd_l( 'l', $start . '-' . ( $start + $incr ) );
+ return _cmd_l_main( $start . '-' . ( $start + $incr ) );
}
sub _cmd_l_plus {
@@ -5571,7 +5571,7 @@ sub _cmd_l_plus {
# Create a line range we'll understand, and recurse to do it.
my $line = $start . '-' . ( $start + $incr );
- return cmd_l( 'l', $line );
+ return _cmd_l_main( $line );
}
sub _cmd_l_calc_initial_end_and_i {
@@ -5661,9 +5661,9 @@ sub _cmd_l_range {
return;
}
-sub cmd_l {
+sub _cmd_l_main {
my $current_line = $line;
- my (undef, $line) = @_;
+ my $line = shift;
# If this is '-something', delete any spaces after the dash.
$line =~ s/\A-\s*\z/-/;
@@ -5694,6 +5694,12 @@ sub cmd_l {
return;
} ## end sub cmd_l
+sub cmd_l {
+ my (undef, $line) = @_;
+
+ return _cmd_l_main($line);
+}
+
=head3 C<cmd_L> - list breakpoints, actions, and watch expressions (command)
To list breakpoints, the command has to look determine where all of them are