Skip to content

Commit 6186e7e

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 72bce21 commit 6186e7e

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
@@ -2311,7 +2311,8 @@ ($destpod)
23112311
delete $section_info->{X_tags};
23122312
}
23132313

2314-
if ($podname eq $api) {
2314+
my $has_entries = $section_info && keys $section_info->%*;
2315+
if ($has_entries) {
23152316
print $fh "\n", $valid_sections{$section_name}{header}, "\n"
23162317
if defined $valid_sections{$section_name}{header};
23172318

@@ -2323,7 +2324,7 @@ ($destpod)
23232324
}
23242325
}
23252326

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

0 commit comments

Comments
 (0)