diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-12-19 20:44:39 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-12-21 09:07:27 +0100 |
commit | 2ce3647c0f381c639a29f710db854a3f5953ed55 (patch) | |
tree | 368c1cec82375d8f0fb0c8131e94f929740b4f2e /Porting/pod_lib.pl | |
parent | dc4373008ad8232b22c089a9e42f59b45e7c78a1 (diff) | |
download | perl-2ce3647c0f381c639a29f710db854a3f5953ed55.tar.gz |
Re-order entries in the 'master' array returned by get_pod_metadata().
Now it returns just the pod's name, its filename, and the flags (if any).
Diffstat (limited to 'Porting/pod_lib.pl')
-rw-r--r-- | Porting/pod_lib.pl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Porting/pod_lib.pl b/Porting/pod_lib.pl index 7e3cdab944..a87c3ee048 100644 --- a/Porting/pod_lib.pl +++ b/Porting/pod_lib.pl @@ -56,12 +56,12 @@ my %state = ( unless (%Lengths) { __prime_state() unless $state{master}; foreach (@{$state{master}}) { - next unless $_->[0]{dual}; + next unless $_->[2]{dual}; # This is a dual-life perl*.pod file, which will have be copied # to lib/ by the build process, and hence also found there. # These are the only pod files that might become duplicated. - ++$Lengths{-s $_->[2]}; - ++$MD5s{md5(slurp_or_die($_->[2]))}; + ++$Lengths{-s $_->[1]}; + ++$MD5s{md5(slurp_or_die($_->[1]))}; } } @@ -167,12 +167,12 @@ sub __prime_state { my_die "Unknown flag found in section line: $_" if length $flags; push @{$state{master}}, - [\%flags, undef, $filename, undef, $leafname]; + [$leafname, $filename, \%flags]; if ($podname eq 'perldelta') { local $" = '.'; push @{$state{master}}, - [{}, undef, "pod/$state{delta_target}", undef, $delta_leaf]; + [$delta_leaf, "pod/$state{delta_target}"]; $state{pods}{$delta_leaf} = "Perl changes in version @want"; } @@ -218,8 +218,8 @@ sub get_pod_metadata { # Convert these to a list of filenames. ++$our_pods{"$_.pod"} foreach keys %{$state{pods}}; foreach (@{$state{master}}) { - ++$our_pods{"$_->[4].pod"} - if $_->[0]{readme}; + ++$our_pods{"$_->[0].pod"} + if $_->[2]{readme}; } opendir my $dh, 'pod'; |