This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ppptools.pl: Remove special case
authorKarl Williamson <khw@cpan.org>
Fri, 31 May 2019 16:26:20 +0000 (10:26 -0600)
committerNicolas R <atoomic@cpan.org>
Fri, 21 Jun 2019 20:12:12 +0000 (16:12 -0400)
The latest doc entries have a flag indicating that special handling is
used.  Use this flag here instead of knowing the specific current cases
that required it.

(cherry picked from commit f548bffdc1ec2dfa00287c7be4dc3db1354a550c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/ppptools.pl

index 23230a0..146438a 100644 (file)
@@ -307,7 +307,11 @@ sub parse_embed
         if( @e >= 3 ) {
           my($flags, $ret, $name, @args) = @e;
           next unless $flags =~ /A/; # Skip non-public entries
-          next if $flags =~ /[Dx]/; # Skip entries marked as deprecated or unstable
+
+          # Skip entries marked as deprecated or unstable, or non-name ones, like
+          #    PL_parser-E<gt>linestr
+          # which documents a struct entry rather than a function
+          next if $flags =~ /[DxN]/;
           if ($name =~ /^[^\W\d]\w*$/) {
             for (@args) {
               $_ = [trim_arg($_)];
@@ -321,11 +325,6 @@ sub parse_embed
               cond  => ppcond(\@pps),
             };
           }
-          elsif ($name =~ /^[^\W\d]\w*-E<gt>[^\W\d]\w*$/) {
-            # silenty ignore entries of the form
-            #    PL_parser-E<gt>linestr
-            # which documents a struct entry rather than a function
-          }
           else {
             warn "mysterious name [$name] in $file, line $.\n";
           }