This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5db refactor: avoid ampersands, and trailing.
authorShlomi Fish <shlomif@shlomifish.org>
Mon, 1 Oct 2012 15:48:23 +0000 (17:48 +0200)
committerRicardo Signes <rjbs@cpan.org>
Mon, 12 Nov 2012 14:18:31 +0000 (09:18 -0500)
lib/perl5db.pl

index 0792aec..4df33fe 100644 (file)
@@ -4167,13 +4167,19 @@ sub cmd_A {
     # if delete_action blows up for some reason, in which case
     # we print $@ and get out.
     if ( $line eq '*' ) {
-        eval { &delete_action(); 1 } or print $OUT $@ and return;
+        if (! eval { _delete_all_actions(); 1 }) {
+            print {$OUT} $@;
+            return;
+        }
     }
 
     # There's a real line  number. Pass it to delete_action.
     # Error trapping is as above.
     elsif ( $line =~ /^(\S.*)/ ) {
-        eval { &delete_action($1); 1 } or print $OUT $@ and return;
+        if (! eval { delete_action($1); 1 }) {
+            print {$OUT} $@;
+            return;
+        }
     }
 
     # Swing and a miss. Bad syntax.