This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl5db-refactor] Merge two conditionals.
authorShlomi Fish <shlomif@shlomifish.org>
Sat, 29 Sep 2012 23:24:07 +0000 (01:24 +0200)
committerRicardo Signes <rjbs@cpan.org>
Mon, 12 Nov 2012 14:18:28 +0000 (09:18 -0500)
lib/perl5db.pl

index 7983bdf..a0976e1 100644 (file)
@@ -5233,15 +5233,13 @@ sub cmd_L {
             last BREAK_ON_LOAD if $signal;
         }
     } ## end if (%break_on_load and...
-    if ($watch_wanted) {
-        if ( $trace & 2 ) {
-            print {$OUT} "Watch-expressions:\n" if @to_watch;
-            TO_WATCH: for my $expr (@to_watch) {
-                print {$OUT} " $expr\n";
-                last TO_WATCH if $signal;
-            }
-        } ## end if ($trace & 2)
-    } ## end if ($watch_wanted)
+    if ($watch_wanted and ( $trace & 2 )) {
+        print {$OUT} "Watch-expressions:\n" if @to_watch;
+        TO_WATCH: for my $expr (@to_watch) {
+            print {$OUT} " $expr\n";
+            last TO_WATCH if $signal;
+        }
+    }
 } ## end sub cmd_L
 
 =head3 C<cmd_M> - list modules (command)