view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
corpus/dists/YAML.changes view on Meta::CPAN
0.84 Fri Jul 13 18:17:27 GMT 2012
- Resolve distribution error that caused .git to be shipped in the .tar.gz
0.83 Fri Jul 13 15:44:03 GMT 2012
- Only call stat() and tell() on a filehandle if fileno existed
- Explicit tied() call on globs to avoid a 5.16 deprecation warning
0.82 Thu Jul 12 18:49:45 GMT 2012
- Test scalar @array rather than deprecated defined @array (Sebastian
Stumpf)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Common/Index/LocalPackage.pm view on Meta::CPAN
Carp::croak "can't load gz source files without IO::Uncompress::Gunzip\n"
unless $CPAN::Common::Index::Mirror::HAS_IO_UNCOMPRESS_GUNZIP;
( my $uncompressed = $basename ) =~ s/\.gz$//;
$uncompressed = File::Spec->catfile( $self->cache, $uncompressed );
if ( !-f $uncompressed
or File::stat::stat($source)->mtime > File::stat::stat($uncompressed)->mtime ) {
no warnings 'once';
IO::Uncompress::Gunzip::gunzip( map { "$_" } $source, $uncompressed )
or Carp::croak "gunzip failed: $IO::Uncompress::Gunzip::GunzipError\n";
}
}
else {
my $dest = File::Spec->catfile( $self->cache, $basename );
File::Copy::copy($source, $dest)
if !-e $dest || File::stat::stat($source)->mtime > File::stat::stat($dest)->mtime;
}
return 1;
}
sub search_authors { return }; # this package handles packages only
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Cpanorg/Auxiliary.pm view on Meta::CPAN
return {
file => $file,
filedir => $dir,
filename => $filename,
mtime => ( stat($file) )[9],
md5 => $cksum->{$filename}->{md5},
sha256 => $cksum->{$filename}->{sha256},
sha1 => $sha1,
};
}
view all matches for this distribution
view release on metacpan or search on metacpan
eg/mkreport view on Meta::CPAN
printf OUT $row, $dist, $dist, $dist,
'prereqs', "Prerequisites:", join(', ', sort keys %{$deps->{$dist}{prereqs}}),
scalar keys %{ $deps->{$dist}{prereqs} }
}
my $date = localtime((stat($deps_file))[9]);
print OUT <<"HTML";
</tbody>
</table>
<p style="clear: both"></p>
view all matches for this distribution
view release on metacpan or search on metacpan
t/cpandeps-diff-script.t view on Meta::CPAN
($stdout, $stderr) = capture { system( @default_cmd, qw(list)) };
eq_or_diff($stdout, "Brewery\n", "Got expected list");
note("Now add a second mirror, and a module from it");
($stdout, $stderr) = capture { system( @default_cmd, @mirror, qw(add CPAN::FindDependencies mirror DEFAULT)) };
ok((stat(".cpandeps-diff/5.30.3/CPAN::FindDependencies"))[7] > 100,
"yay, we got that module's dependencies from the second mirror");
eq_or_diff($stdout, '', "Nothing on STDOUT");
eq_or_diff($stderr, '', "Nothing on STDERR");
note("List modules again");
t/cpandeps-diff-script.t view on Meta::CPAN
close($fh);
($stdout, $stderr) = capture { system( @default_cmd, @mirror, qw(mirror DEFAULT report CPAN::FindDependencies) ) };
like($stdout, qr{\|this isn't a real dep, LOL\s+\*\s+\|\s+\|}, "Differences found");
eq_or_diff($stderr, '', "Nothing on STDERR");
my $prev_size = (stat(".cpandeps-diff/5.30.3/Brewery"))[7];
($stdout, $stderr) = capture { system( @default_cmd, @mirror, qw(mirror DEFAULT report Brewery) ) };
ok((stat(".cpandeps-diff/5.30.3/Brewery"))[7] != $prev_size,
"And a module with deps on both mirrors got spotted too");
};
done_testing();
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) {
die << "END_DIE";
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Metadata/RDF.pm view on Meta::CPAN
my $t = File::Type->new;
my $format = $t->mime_type($path);
my ($dist, $version) = $self->extract_name_version($distversion);
my $stat = stat($path);
my $datetime = DateTime->from_epoch(epoch =>$stat->mtime)->datetime;
my $filesize = $stat->size;
my $mirrored = "0";
$mirrored = "1" if exists $mirrored{$suffix};
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/File/Copy/Recursive.pm view on Meta::CPAN
copy(@_) or return;
my @base_file = File::Spec->splitpath($_[0]);
my $mode_trg = -d $_[1] ? File::Spec->catfile($_[1], $base_file[ $#base_file ]) : $_[1];
chmod scalar((stat($_[0]))[2]), $mode_trg if $KeepMode;
}
return wantarray ? (1,0,0) : 1; # use 0's incase they do math on them and in case rcopy() is called in list context = no uninit val warnings
}
sub rcopy {
inc/File/Copy/Recursive.pm view on Meta::CPAN
$filen++ if $end eq $baseend;
$dirn++ if $end eq $baseend;
$DirPerms = oct($DirPerms) if substr($DirPerms,0,1) eq '0';
mkdir($end,$DirPerms) or return if !-d $end;
chmod scalar((stat($str))[2]), $end if $KeepMode;
if($MaxDepth && $MaxDepth =~ m/^\d+$/ && $level >= $MaxDepth) {
return ($filen,$dirn,$level) if wantarray;
return $filen;
}
$level++;
inc/File/Copy/Recursive.pm view on Meta::CPAN
}
else {
fcopy($org,$new,$buf) or return if defined $buf;
fcopy($org,$new) or return if !defined $buf;
}
chmod scalar((stat($org))[2]), $new if $KeepMode;
$filen++;
}
}
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Mirror/Server/HTTP.pm view on Meta::CPAN
my %dir;
{
opendir my $DIR, $path or die "$!\n";
$dir{ $_ } = [ ( stat( File::Spec->catfile( $path, $_ ) ) )[7,9],
( -d File::Spec->catfile( $path, $_ ) ? 1 : 0 ),
] for grep { !/^\./ } readdir $DIR;
}
my $h = HTML::Tiny->new;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Mirror/Tiny/CLI.pm view on Meta::CPAN
return unless -d $self->{base};
my ($index, @dist);
my $wanted = sub {
my $name = $_;
return if !-f $name or $name =~ /\.json$/;
my $stat = File::stat::stat($name);
if ($name =~ /02packages.details.txt.gz$/) {
$index = {name => $name, mtime => $stat->mtime, size => $stat->size};
} else {
push @dist, {name => $name, mtime => $stat->mtime, size => $stat->size};
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Releases/Latest.pm view on Meta::CPAN
require Time::Duration::Parse;
my $max_age_in_seconds = Time::Duration::Parse::parse_duration(
$self->max_age
);
return unless time() - $max_age_in_seconds
> (stat($self->cache_path))[9];
}
$self->_build_cached_index();
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/SQLite/META.pm view on Meta::CPAN
$CPAN::FrontEnd->mywarn('Database locked - cannot update.');
return;
}
my @args = ($^X, '-MCPAN::SQLite::META=setup,update,check', '-e');
if (-e $db && -s _) {
my $mtime_db = (stat(_))[9];
my $time_string = gmtime_string($mtime_db);
$CPAN::FrontEnd->myprint("Database was generated on $time_string\n");
# Check for status, force update if it fails
if (system(@args, 'check')) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Testers/Data/Uploads.pm view on Meta::CPAN
my $name = $dist->dist; # "CPAN-DistnameInfo"
my $version = $dist->version; # "0.02"
my $cpanid = $dist->cpanid; # "GBARR"
my $filename = $dist->filename; # "CPAN-DistnameInfo-0.02.tar.gz"
my $date = (stat($file))[9];
unless($name && defined $version && $cpanid && $date) {
#$self->_log("PARSE: FAIL file=$file, $type => $name => $version => $cpanid => $date => $filename");
$file =~ s!/opt/projects/CPAN/!!;
$db->do_query($phrasebook{'ParseFailed'},$file,$type,$name,$version,$filename,$cpanid,$date);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPAN/Unpack.pm view on Meta::CPAN
close $fh;
}
sub fixme {
my $path = $_;
my $mode = ( stat($path) )[2];
if ( S_ISDIR($mode) ) {
chmod( ( S_IMODE($mode) | S_IRWXU ), $path )
unless ( ( $mode & S_IRWXU ) == S_IRWXU );
}
}
lib/CPAN/Unpack.pm view on Meta::CPAN
my @files = <$to/*>;
my $files = @files;
if ( $files == 1 ) {
my $file = $files[0];
if ( S_ISDIR( ( stat( $file ) )[2] ) ) {
rename $file, $want;
} else {
mkdir $want;
rename $file, "$want/" . basename($file);
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 and (stat($0))[9] > time ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future.
This is known to create infinite loops in make.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPANPLUS/Dist/Slackware.pm view on Meta::CPAN
msg( loc( q{Creating package '%1'}, $outputname ) );
my $orig_uid = $UID;
my $orig_gid = ( split /\s+/, $GID )[0];
if ($needs_chown) {
my @stat = stat($destdir);
if ( !@stat ) {
error( loc( q{Could not stat '%1': %2}, $destdir, $OS_ERROR ) );
return;
}
$orig_uid = $stat[4];
lib/CPANPLUS/Dist/Slackware.pm view on Meta::CPAN
my $wanted = sub {
my $filename = $_;
return if $filename eq q{.};
my @stat = lstat($filename);
if ( !@stat ) {
error( loc( q{Could not lstat '%1': %2}, $filename, $OS_ERROR ) );
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/inc1/inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# 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 }
view all matches for this distribution