This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl5db] Refactored argument passing.
authorShlomi Fish <shlomif@shlomifish.org>
Mon, 1 Oct 2012 11:57:51 +0000 (13:57 +0200)
committerRicardo Signes <rjbs@cpan.org>
Mon, 12 Nov 2012 14:18:31 +0000 (09:18 -0500)
lib/perl5db.pl

index 7c8ae48..ded3677 100644 (file)
@@ -4536,10 +4536,8 @@ specified) to the specified line. Dies if it can't.
 =cut
 
 sub break_on_line {
-    my ( $i, $cond ) = @_;
-
-    # Always true if no condition supplied.
-    $cond = 1 unless @_ >= 2;
+    my $i = shift;
+    my $cond = @_ ? shift(@_) : 1;
 
     my $inii  = $i;
     my $after = '';