Data-Mirror
view release on metacpan or search on metacpan
lib/Data/Mirror.pm view on Meta::CPAN
# the later of the current mtime or now
#
my $expires = str2time($result->header('expires')) || max(stat($file)->mtime, time());
utime($expires, $expires, $file) if (-e $file);
}
carp($result->status_line) if ($result->code >= 400);
if (-e $file) {
chmod(0600, $file);
return $file;
}
return undef;
}
sub mirror_str {
my $file = mirror_file(@_);
( run in 0.310 second using v1.01-cache-2.11-cpan-8d75d55dd25 )