summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2012-11-14 09:47:46 +0200
committerTony Cook <tony@develop-help.com>2013-01-02 11:22:00 +1100
commitef9660c1dcf8eb606bd3dd4c98fe8d6d8838fd24 (patch)
tree07d06ea22f92847f3ecf421d8dd25dadff714e65 /lib
parent65c1346e0fdace4caa4b1a6196704243a31ac8c3 (diff)
downloadperl-ef9660c1dcf8eb606bd3dd4c98fe8d6d8838fd24.tar.gz
Got rid of passing $cmd to subs that don't use it.
Diffstat (limited to 'lib')
-rw-r--r--lib/perl5db.pl10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index aa2ce8cc19..936ad704c1 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -5489,7 +5489,6 @@ sub _cmd_l_handle_var_name {
}
sub _cmd_l_handle_subname {
- my $cmd = shift;
my $line = shift;
my $s = $subname;
@@ -5600,7 +5599,7 @@ sub _cmd_l_calc_initial_end_and_i {
}
sub _cmd_l_range {
- my ($cmd, $line, $current_line, $start_match, $end_match) = @_;
+ my ($line, $current_line, $start_match, $end_match) = @_;
my ($end, $i) =
_cmd_l_calc_initial_end_and_i($line, $start_match, $end_match);
@@ -5664,8 +5663,7 @@ sub _cmd_l_range {
sub cmd_l {
my $current_line = $line;
- my $cmd = shift;
- my $line = shift;
+ my (undef, $line) = @_;
# If this is '-something', delete any spaces after the dash.
$line =~ s/\A-\s*\z/-/;
@@ -5678,7 +5676,7 @@ sub cmd_l {
}
# l name. Try to find a sub by that name.
elsif ( ($subname) = $line =~ /\A([\':A-Za-z_][\':\w]*(?:\[.*\])?)/s ) {
- return _cmd_l_handle_subname($cmd, $line);
+ return _cmd_l_handle_subname($line);
}
# Bare 'l' command.
elsif ( $line !~ /\S/ ) {
@@ -5690,7 +5688,7 @@ sub cmd_l {
}
# l start-stop or l start,stop
elsif (my ($s, $e) = $line =~ /^(?:(-?[\d\$\.]+)(?:[-,]([\d\$\.]+))?)?/ ) {
- return _cmd_l_range($cmd, $line, $current_line, $s, $e);
+ return _cmd_l_range($line, $current_line, $s, $e);
}
return;