summaryrefslogtreecommitdiff
path: root/pod/buildtoc
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-12-19 19:34:56 +0100
committerNicholas Clark <nick@ccl4.org>2011-12-21 09:07:27 +0100
commit4e604983952b1d2a9eb17c9c99e4d1d4947f3010 (patch)
tree72249b007019cb60713748d7231b04e547298ef3 /pod/buildtoc
parent0aef0fe5d2d4655704f4ccaaacd38582e3744d71 (diff)
downloadperl-4e604983952b1d2a9eb17c9c99e4d1d4947f3010.tar.gz
Rationalise use of the Pod metadata structure returned by get_pod_metadata().
Nothing uses the entries in the 'master' array for the for the elements flagged as 'aux', so don't generate them. Only buildtoc uses the the 'aux' hash, and only the keys in sorted order, so replace the hash with a sorted array. All entries in the 'master' array are now defined, and references to 5 element arrays, so remove code that checks for this. Likewise, as the 'aux' flag is no longer used, remove code related to it. When generating the entries for README files in %our_pods in the consistency checking code in get_pod_metadata, $_->[4] and $_->[1] will always be equal, as no READMEs are copied from dual life modules. So use $_->[1] instead, as this permits a future simplification.
Diffstat (limited to 'pod/buildtoc')
-rw-r--r--pod/buildtoc4
1 files changed, 2 insertions, 2 deletions
diff --git a/pod/buildtoc b/pod/buildtoc
index a8a05ff414..3ab42d3770 100644
--- a/pod/buildtoc
+++ b/pod/buildtoc
@@ -76,7 +76,7 @@ my $roffitall;
EOPOD2B
# All the things in the master list that happen to be pod filenames
-foreach (grep {defined $_ && @$_ == 5 && !$_->[0]{toc_omit}} @{$state->{master}}) {
+foreach (grep {!$_->[0]{toc_omit}} @{$state->{master}}) {
$roffitall .= " \$mandir/$_->[4].1 \\\n";
podset($_->[4], $_->[2]);
}
@@ -109,7 +109,7 @@ $_= <<"EOPOD2B";
EOPOD2B
-$_ .= join "\n", map {"\t=item $_\n"} sort keys %{$state->{aux}};
+$_ .= join "\n", map {"\t=item $_\n"} @{$state->{aux}};
$_ .= <<"EOPOD2B" ;
=back