summaryrefslogtreecommitdiff
path: root/autodoc.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-10-20 07:31:03 -0600
committerKarl Williamson <khw@cpan.org>2020-10-22 08:54:04 -0600
commitd5c04b1e7e8cced131631a851fe8b86053092a8e (patch)
treea8d1709dbd211ebc20465b17af23d7fb5091da04 /autodoc.pl
parent02c5183e38f4ea3ddc3489cd20033247b5a00f47 (diff)
downloadperl-d5c04b1e7e8cced131631a851fe8b86053092a8e.tar.gz
autodoc.pl: Extract code into a function
This is in preparation of it becoming more complex in a future commit
Diffstat (limited to 'autodoc.pl')
-rw-r--r--autodoc.pl36
1 files changed, 3 insertions, 33 deletions
diff --git a/autodoc.pl b/autodoc.pl
index 936f34ee36..dfd91ce8fc 100644
--- a/autodoc.pl
+++ b/autodoc.pl
@@ -1284,6 +1284,7 @@ sub construct_missings_section {
return $text unless $missings_ref->@*;
$text .= <<~EOT;
+
=head1 Undocumented functions
EOT
@@ -1334,7 +1335,7 @@ sub dictionary_order {
}
sub output {
- my ($podname, $header, $dochash, $missing, $footer) = @_;
+ my ($podname, $header, $dochash, $missings_ref, $footer) = @_;
#
# strip leading '|' from each line which had been used to hide
# pod from pod checkers.
@@ -1384,38 +1385,7 @@ sub output {
&& defined $valid_sections{$section_name}{footer};
}
- if (@$missing) {
- print $fh "\n=head1 Undocumented functions\n";
- print $fh $podname eq 'perlapi' ? <<'_EOB_' : <<'_EOB_';
-
-The following functions have been flagged as part of the public API,
-but are currently undocumented. Use them at your own risk, as the
-interfaces are subject to change. Functions that are not listed in this
-document are not intended for public use, and should NOT be used under any
-circumstances.
-
-If you feel you need to use one of these functions, first send email to
-L<perl5-porters@perl.org|mailto:perl5-porters@perl.org>. It may be
-that there is a good reason for the function not being documented, and it
-should be removed from this list; or it may just be that no one has gotten
-around to documenting it. In the latter case, you will be asked to submit a
-patch to document the function. Once your patch is accepted, it will indicate
-that the interface is stable (unless it is explicitly marked otherwise) and
-usable by you.
-
-_EOB_
-The following functions are currently undocumented. If you use one of
-them, you may wish to consider creating and submitting documentation for
-it.
-
-_EOB_
- print $fh "\n=over $description_indent\n";
-
- for my $missing (sort sort_helper @$missing) {
- print $fh "\n=item C<$missing>\nX<$missing>\n";
- }
- print $fh "\n=back\n";
- }
+ print $fh construct_missings_section($podname, $missings_ref);
print $fh "\n$footer\n=cut\n";