This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Prime the duplicate Pod cache the first time is_duplicate_pod() is called.
authorNicholas Clark <nick@ccl4.org>
Sun, 18 Dec 2011 14:03:18 +0000 (15:03 +0100)
committerNicholas Clark <nick@ccl4.org>
Mon, 19 Dec 2011 12:55:19 +0000 (13:55 +0100)
commit4027e27b35630b1e4213355d1223d476fa09a600
tree5b10fc4805ea0879fa65b925ca012564c792464f
parent9887f4486771327e32cc7026d4b939cc89ccc7b2
Prime the duplicate Pod cache the first time is_duplicate_pod() is called.

Previously it was primed when get_pod_metadata() was called. This removes the
undocumented assumption that is_duplicate_pod() will only be called after
get_pod_metadata(), and avoids reading 14 Pod files to calculate their MD5s
unless actually necessary.

This change means that the array references in @{$state{master}} are being
accessed much later during runtime. This reveals that podset() in buildtoc
had been clobbering its callers $_, which happened to be an alias to the
current element of @{$state{master}}.
Porting/pod_lib.pl
pod/buildtoc