This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlreref: alpha assertions are valid in (COND)
[perl5.git] / autodoc.pl
index d199bd8..b8d46b3 100644 (file)
@@ -44,11 +44,17 @@ my @specialized_docs = sort qw( perlguts
                                 perlcall
                                 perlfilter
                                 perlmroapi
+                                config.h
                               );
-my $other_places_api = join " ",    map { "L<$_>" } sort @specialized_docs, 'perlintern';
-my $other_places_intern = join " ", map { "L<$_>" } sort @specialized_docs, 'perlapi';
+sub name_in_pod($) {
+    my $name = shift;
+    return "F<$name>" if $name =~ /\./;
+    return "L<$name>";
+}
+my $other_places_api = join " ",    map { name_in_pod($_) } sort @specialized_docs, 'perlintern';
+my $other_places_intern = join " ", map { name_in_pod($_) } sort @specialized_docs, 'perlapi';
 
-@specialized_docs = map { "L<$_>" } sort @specialized_docs;
+@specialized_docs = map { name_in_pod($_) } sort @specialized_docs;
 $specialized_docs[-1] =~ s/^/and /;
 my $specialized_docs = join ", ", @specialized_docs;
 
@@ -245,7 +251,7 @@ removed without notice.\n\n$docs" if $flags =~ /x/;
                 }
             }
             my $args = '';
-            if ($p && $flags !~ /T/) {
+            if ($flags !~ /T/ && ($p || ($flags =~ /m/ && $name =~ /^Perl_/))) {
                 $args = @args ? "pTHX_ " : "pTHX";
                 if ($long_args) { print $fh $args; $args = '' }
             }
@@ -391,8 +397,8 @@ foreach (sort keys %missing) {
 # walk table providing an array of components in each line to
 # subroutine, printing the result
 
-# List of funcs in the public API that aren't also marked as experimental nor
-# deprecated.
+# List of funcs in the public API that aren't also marked as core-only,
+# experimental nor deprecated.
 my @missing_api = grep $funcflags{$_}{flags} =~ /A/
                     && $funcflags{$_}{flags} !~ /[xD]/
                     && !$docs{api}{$_}, keys %funcflags;