Reported by Reini Urban in RT #110078, installperl generated a warning and
failed to install CORE.pod, because is_duplicate_pod() modified $_
is_duplicate_pod() and get_pod_metadata() now both localise $_, to ensure
that they don't corrupt any caller's state.
sub is_duplicate_pod {
my $file = shift;
+ local $_;
# Initialise the list of possible source files on the first call.
unless (%Lengths) {
my $permit_missing_generated = shift;
# Do they want a consistency report?
my $callback = shift;
+ local $_;
__prime_state() unless $state{master};
return \%state unless $callback;