X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=autodoc.pl;h=cb77a14ae940bd6549bc0f08d89fc9aec04037b8;hb=fabdb6c0879db76333e970b6c67260c877fc17b3;hp=d347e4c95ed119ad2b9df03ed74acd44c5cb050d;hpb=1b6737cc10a847650f574c35f419cbd680a5a5ef;p=p5sagit%2Fp5-mst-13.2.git diff --git a/autodoc.pl b/autodoc.pl index d347e4c..cb77a14 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -65,6 +65,7 @@ sub walk_table (&@) { my %apidocs; my %gutsdocs; my %docfuncs; +my %seenfuncs; my $curheader = "Unknown section"; @@ -120,13 +121,14 @@ DOC: sub docout ($$$) { # output the docs for one function my($fh, $name, $docref) = @_; my($flags, $docs, $ret, $file, @args) = @$docref; + $name =~ s/\s*$//; $docs .= "NOTE: this function is experimental and may change or be removed without notice.\n\n" if $flags =~ /x/; $docs .= "NOTE: the perl_ form of this function is deprecated.\n\n" if $flags =~ /p/; - print $fh "=item $name\n$docs"; + print $fh "=item $name\nX<$name>\n$docs"; if ($flags =~ /U/) { # no usage # nothing @@ -163,26 +165,27 @@ open (DOC, ">pod/perlapi.pod") or die "Can't create pod/perlapi.pod: $!\n"; binmode DOC; -walk_table { # load documented functions into approriate hash +walk_table { # load documented functions into appropriate hash if (@_ > 1) { my($flags, $retval, $func, @args) = @_; return "" unless $flags =~ /d/; $func =~ s/\t//g; $flags =~ s/p//; # clean up fields from embed.pl $retval =~ s/\t//; my $docref = delete $docfuncs{$func}; + $seenfuncs{$func} = 1; if ($docref and @$docref) { if ($flags =~ /A/) { $docref->[0].="x" if $flags =~ /M/; - $apidocs{$docref->[4]}{$func} = - [$docref->[0] . 'A', $docref->[1], $retval, - $docref->[3], @args]; + $apidocs{$docref->[4]}{$func} = + [$docref->[0] . 'A', $docref->[1], $retval, $docref->[3], + @args]; } else { - $gutsdocs{$docref->[4]}{$func} = + $gutsdocs{$docref->[4]}{$func} = [$docref->[0], $docref->[1], $retval, $docref->[3], @args]; } } else { - warn "no docs for $func\n" unless $docref and @$docref; + warn "no docs for $func\n" unless $seenfuncs{$func}; } } return ""; @@ -200,6 +203,7 @@ print DOC <<'_EOB_'; perlapi - autogenerated documentation for the perl public API =head1 DESCRIPTION +X X X This file contains the documentation of the perl public API generated by embed.pl, specifically a listing of functions, macros, flags, and variables @@ -264,6 +268,7 @@ perlintern - autogenerated documentation of purely B Perl functions =head1 DESCRIPTION +X X This file is the autogenerated documentation of functions in the Perl interpreter that are documented using Perl's internal documentation