Skip to content

Commit fbabdb5

Browse files
committed
perlintern: Include section headings for non-empties
For example, the "CV Handling" section in perlintern did not include the introduction for it that appears in perlapi; just the elements. It is more convenient for the reader to have that short summary in this pod as well.
1 parent d82c8b4 commit fbabdb5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

autodoc.pl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,7 +2324,8 @@ ($destpod)
23242324
delete $section_info->{X_tags};
23252325
}
23262326

2327-
if ($podname eq $api) {
2327+
my $has_entries = $section_info && keys $section_info->%*;
2328+
if ($has_entries) {
23282329
print $fh "\n", $valid_sections{$section_name}{header}, "\n"
23292330
if defined $valid_sections{$section_name}{header};
23302331

@@ -2336,7 +2337,7 @@ ($destpod)
23362337
}
23372338
}
23382339

2339-
if (! $section_info || ! keys $section_info->%*) {
2340+
if (! $has_entries) {
23402341
my $pod_type = ($podname eq $api) ? "public" : "internal";
23412342
print $fh "\nThere are currently no $pod_type API items in ",
23422343
$section_name, "\n";

0 commit comments

Comments
 (0)