App-Tel
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" }
local/lib/perl5/File/Remove.pm view on Meta::CPAN
$can_delete = VMS::Filespec::candelete($path);
} elsif ( IS_WIN32 ) {
# Assume we can delete it for the moment
$can_delete = 1;
} elsif ( -w $path ) {
# We have write permissions already
$can_delete = 1;
} elsif ( $< == 0 ) {
# Unixy and root
$can_delete = 1;
} elsif ( (lstat($path))[4] == $< ) {
# I own the file
$can_delete = 1;
} else {
# I don't think we can delete it
$can_delete = 0;
}
unless ( $can_delete ) {
print "nowrite: $path\n" if DEBUG;
next;
}
local/lib/perl5/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" }
local/lib/perl5/inc/Module/Install.pm view on Meta::CPAN
# loads, it remains so Module::Install itself can detect which
# version an author currently has installed.
# This allows it to implement any back-compatibility features
# it may want or need to.
$VERSION = '1.16';
}
if ( -d './inc' ) {
my $author = $^O eq 'VMS' ? './inc/_author' : './inc/.author';
if ( -d $author ) {
my $modified_at = (stat($author))[9];
if ((time - $modified_at) > 24 * 60 * 60) {
# inc is a bit stale; there may be a newer Module::Install
_check_update($modified_at);
}
$Module::Install::AUTHOR = 1;
require File::Path;
File::Path::rmtree('inc');
}
} else {
$Module::Install::AUTHOR = 1;
local/lib/perl5/inc/Module/Install.pm view on Meta::CPAN
my $modified_at = shift;
return unless eval "require Compress::Zlib; 1";
_require_myconfig_or_config() or return;
my $file = File::Spec->catfile(
$CPAN::Config->{keep_source_where},
'modules',
'02packages.details.txt.gz'
);
return unless -f $file;
# return if (stat($file))[9] < $modified_at;
my $gz = Compress::Zlib::gzopen($file, 'r') or return;
my $line;
while($gz->gzreadline($line)) {
my ($cpan_version) = $line =~ /^Module::Install\s+(\S+)/ or next;
return $cpan_version;
}
return;
}
( run in 0.470 second using v1.01-cache-2.11-cpan-49f99fa48dc )