This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
devel/mktodo.pl: Reorder else clauses
[perl5.git] / dist / Devel-PPPort / devel / mktodo.pl
index db6e719..e3cd3a3 100644 (file)
@@ -410,15 +410,16 @@ sub get_apicheck_symbol_map
 
   while (<$fh>) {
     next if /^#/;
-    if (defined $cur) {
+
+    if (! defined $cur) {
+      /_DPPP_test_(\w+)/ and $cur = $1;
+    }
+    else {
       for my $sym (/\b([A-Za-z_]\w+)\b/g) {
         $symmap{$sym}{$cur}++;
       }
       undef $cur if /^}$/;
     }
-    else {
-      /_DPPP_test_(\w+)/ and $cur = $1;
-    }
   }
 
   return \%symmap;