summaryrefslogtreecommitdiff
path: root/autodoc.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-09-04 14:04:23 -0600
committerKarl Williamson <khw@cpan.org>2020-09-04 16:13:25 -0600
commit0d6f5135e72801510c1462e4956ae709e753b603 (patch)
treed4977cb645999397322cbbd6a94fd4de740115c6 /autodoc.pl
parentd200575557039fb1aab7bc01b66d06c27b070911 (diff)
downloadperl-0d6f5135e72801510c1462e4956ae709e753b603.tar.gz
autodoc: Don't output empty sections
Diffstat (limited to 'autodoc.pl')
-rw-r--r--autodoc.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/autodoc.pl b/autodoc.pl
index 45d2808f09..44f7b8f1d7 100644
--- a/autodoc.pl
+++ b/autodoc.pl
@@ -356,6 +356,7 @@ sub output {
my $key;
for $key (sort sort_helper keys %$dochash) {
my $section = $dochash->{$key};
+ next unless keys %$section; # Skip empty
print $fh "\n=head1 $key\n\n";
# Output any heading-level documentation and delete so won't get in
@@ -364,6 +365,7 @@ sub output {
print $fh $section->{""} . "\n";
delete $section->{""};
}
+ next unless keys %$section; # Skip empty
print $fh "=over 8\n\n";
for my $key (sort sort_helper keys %$section) {