App-DistSync
view release on metacpan or search on metacpan
lib/App/DistSync.pm view on Meta::CPAN
$props{file_mirrors} = File::Spec->catfile($dir, MIRRORS);
$props{file_readme} = File::Spec->catfile($dir, README);
$props{file_temp} = File::Spec->catfile(File::Spec->tmpdir(), TEMPFILE);
# Read META file as YAML
my $meta = read_yaml($props{file_meta});
$props{meta} = $meta;
# Create current static dates
$props{mtime_manifest} = (-e $props{file_manifest}) && -s $props{file_manifest}
? (stat($props{file_manifest}))[9]
: 0;
$props{mtime_manidel} = (-e $props{file_manidel}) && -s $props{file_manidel}
? (stat($props{file_manidel}))[9]
: 0;
$props{mtime_mirrors} = (-e $props{file_mirrors}) && -s $props{file_mirrors}
? (stat($props{file_mirrors}))[9]
: 0;
# Read MANIFEST, MANIFEST.SKIP, MANIFEST.DEL files
$props{manifest} = maniread($props{file_manifest});
$props{maniskip} = maniread($props{file_maniskip}, SKIPMODE);
$props{manidel} = maniread($props{file_manidel});
$props{mirrors} = maniread($props{file_mirrors});
# TimeOut
my $to = $props{timeout};
lib/App/DistSync.pm view on Meta::CPAN
#my ($volume,$sdirs,$sfile) = File::Spec->splitpath( $base );
my $wanted = sub {
my $path = File::Spec->canonpath($_);
my $name = File::Spec->abs2rel( $path, $base );
my $fdir = File::Spec->canonpath($File::Find::dir);
return if -d $_;
my $key = join("/", File::Spec->splitdir(File::Spec->catfile($name)));
$found->{$key} = {
mtime => (stat($_))[9] || 0,
size => (-s $_) || 0,
dir => $fdir,
path => $path,
file => File::Spec->abs2rel( $path, $fdir ),
};
};
# We have to use "$File::Find::dir/$_" in preprocess, because
# $File::Find::name is unavailable.
# Also, it's okay to use / here, because MANIFEST files use Unix-style
( run in 0.832 second using v1.01-cache-2.11-cpan-49f99fa48dc )