App-StaticImageGallery
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# we shouldn't really depend on it. See RT #24194 for detail.
# (Also, this module only supports Perl 5.6 and above).
eval "use Win32::UTCFileTime" if $^O eq 'MSWin32' && $] >= 5.006;
# If the script that is loading Module::Install is from the future,
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
# Too far in the future, throw an error.
my $t = time;
if ( $s > $t ) { die <<"END_DIE" }
lib/App/StaticImageGallery/Image.pm view on Meta::CPAN
return;
}
return $filename;
}
sub must_create {
my ($self,$filename) = @_;
my $original = sprintf("%s/%s",$self->work_dir,$self->original);
my $new = sprintf("%s/%s",$self->data_dir,$filename);
my $mtime_original = (stat($original))[9];
my $mtime_new = (stat($new))[9] || 0;
if ( $mtime_new > $mtime_original ){
$self->msg_verbose(6,"must_create:FALSE Original:%s:%d New:%s:%d",
$original,
$mtime_original,
$new,
$mtime_new,
);
return 0;
}
( run in 0.904 second using v1.01-cache-2.11-cpan-49f99fa48dc )