This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
devel/mktodo.pl: Move invariant expression out of loop
[perl5.git] / dist / Devel-PPPort / devel / mktodo.pl
index 32c284b..db6e719 100644 (file)
@@ -338,10 +338,9 @@ sub find_undefined_symbols
   my @undefined;
 
   for my $sym (keys %$ls) {
+    next if $sym =~ /\@/ or $sym =~ /^_/ or exists $stdsym{$sym};
     unless (exists $ps->{$sym}) {
-      if ($sym !~ /\@/ and $sym !~ /^_/) {
-        push @undefined, $sym unless $stdsym{$sym};
-      }
+        push @undefined, $sym;
     }
   }