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
authorKarl Williamson <khw@cpan.org>
Thu, 11 Jul 2019 04:22:07 +0000 (22:22 -0600)
committerNicolas R <atoomic@cpan.org>
Fri, 27 Sep 2019 22:39:31 +0000 (16:39 -0600)
(cherry picked from commit a513fe6f824d69d855753d04893a94692433a718)
Signed-off-by: Nicolas R <atoomic@cpan.org>
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) {
   my @undefined;
 
   for my $sym (keys %$ls) {
+    next if $sym =~ /\@/ or $sym =~ /^_/ or exists $stdsym{$sym};
     unless (exists $ps->{$sym}) {
     unless (exists $ps->{$sym}) {
-      if ($sym !~ /\@/ and $sym !~ /^_/) {
-        push @undefined, $sym unless $stdsym{$sym};
-      }
+        push @undefined, $sym;
     }
   }
 
     }
   }