diff options
author | Karl Williamson <khw@cpan.org> | 2020-09-04 14:04:23 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-09-04 16:13:25 -0600 |
commit | 0d6f5135e72801510c1462e4956ae709e753b603 (patch) | |
tree | d4977cb645999397322cbbd6a94fd4de740115c6 /autodoc.pl | |
parent | d200575557039fb1aab7bc01b66d06c27b070911 (diff) | |
download | perl-0d6f5135e72801510c1462e4956ae709e753b603.tar.gz |
autodoc: Don't output empty sections
Diffstat (limited to 'autodoc.pl')
-rw-r--r-- | autodoc.pl | 2 |
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) { |