if ((stat($target))[9] < (stat($source))[9]) {
... do work ...
}
####
if ($force or (stat($target))[9] < (stat($source))[9]) {
... do work ...
}
####
GetOptions(
'f' => \my $force,
'o' => \my $outdir,
);
$outdir ||= 'thumbnails';
my $needs_remake = My::Dependencies::MTime->new( force => $force );
for my $source_image (@ARGV) {
if ($needs_remake->([$source_image], ["$outdir/${source_image}_t.jpg"])) {
... do work here
};
};
####
if (test_dep( -target => $thumbname, -depend => $info->{file} )) {
...
}