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/App/KGB/Client/CVS.pm view on Meta::CPAN
return if fork(); # parent process exits
#warn "$$ waiting\n";
# wait for the merge file to settle
while( time() - (stat(MERGE))[9] < 3 ) {
sleep(1);
}
close(MERGE);
open(MERGE, $merge_file) or die "Error reopening $merge_file: $!\n";
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/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/App/LXC/Container/Update.pm view on Meta::CPAN
foreach (@paths)
{
-e $_ or fatal('_1_does_not_exist', $path);
my $target = $root . $_;
next if -e $target;
my $stat = stat($_);
my ($mode, $uid, $gid) = ($stat->mode, $stat->uid, $stat->gid);
if (-d)
{
$mode |= 0200; # prevent blocking ourselves later on
if (-l)
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/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/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/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/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/App/MBUtiny/Util.pm view on Meta::CPAN
if (-d $f) {
my $end = File::Spec->catdir($tg, $p);
print ">D $f -> $end\n" if $DEBUG;
unless (-e $end) {
mkdir($end,DIRMODE) or carp(sprintf("Can't create directoy \"%s\": ", $end, $!)) && return;
chmod scalar((stat($f))[2]), $end;
}
} else {
my $end = File::Spec->catfile($tg, $p);
print ">F $f -> $end\n" if $DEBUG;
unless (-e $end) {
copy($f,$end) or carp(sprintf("Copy failed \"%s\" -> \"%s\": %s", $f, $end, $!)) && return;
chmod scalar((stat($f))[2]), $end;
}
}
}
},
no_chdir => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
bin/mfile-www view on Meta::CPAN
my ( $old, $new ) = @_;
die "Need to be root to create symlink" unless $sharedir_writable;
my ( undef, $path, $file ) = File::Spec->splitpath( $new );
make_path( $path );
symlink( $old, $new ) ;
if ( ! stat( $new ) ) {
unlink( $new );
die "Could not create symlink $old -> $new";
}
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/MHFS/HTTP/Server/Client/Request.pm view on Meta::CPAN
say "SLF: open failed";
$self->Send404;
return;
}
binmode($FH);
my $st = stat($FH);
if(! $st) {
$self->Send404();
return;
}
$currentsize = $st->size;
lib/MHFS/HTTP/Server/Client/Request.pm view on Meta::CPAN
# setup callback for retrieving current file size if we are following the file
if($fileitem{'fh'}) {
if(! $done) {
$get_current_size = sub {
return stat($fileitem{'fh'})
};
}
my $get_read_filesize = sub {
my $maxsize = $get_max_size->();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MaMGal/Entry.pm view on Meta::CPAN
sub fresher_than_me
{
my $self = shift;
my $path = shift;
my %opts = @_;
my $stat = stat($path) or return 0;
return 1 if $stat->mtime >= $self->content_modification_time(%opts);
return 0;
}
# Whether this entry should be shown in a directory contents montage
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
$self->{version}=$VERSION;
$self->dirty;
$self;
}
sub xlstat($) {
my @stat = lstat $_[0];
@stat ?
{
path => $_[0],
dev => $stat[ 0],
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/App/MonM/Notifier/Monotifier.pm view on Meta::CPAN
# DB status
printf("DB DSN : %s\n", $store->dsn);
printf("DB status : %s\n", $store->error ? red("ERROR") : green("OK"));
my $db_is_ok = $store->error ? 0 : 1;
if ($db_is_ok && $store->{file} && -e $store->{file}) {
my $s = File::stat::stat($store->{file})->size;
printf("DB file : %s\n", $store->{file});
printf("DB size : %s\n", sprintf("%s (%d bytes)", _fbytes($s), $s));
printf("DB modified : %s\n", _fdate(File::stat::stat($store->{file})->mtime || 0));
}
$self->raise($store->error) unless $db_is_ok;
return 1;
});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MonM.pm view on Meta::CPAN
# DB status
printf("DB DSN : %s\n", $store->dsn);
printf("DB status : %s\n", $store->error ? red("ERROR") : green("OK"));
my $db_is_ok = $store->error ? 0 : 1;
if ($db_is_ok && $store->{file} && -e $store->{file}) {
my $s = File::stat::stat($store->{file})->size;
printf("DB file : %s\n", $store->{file});
printf("DB size : %s\n", sprintf("%s (%d bytes)", _fbytes($s), $s));
printf("DB modified : %s\n", _fdate(File::stat::stat($store->{file})->mtime || 0));
}
$self->raise($store->error) unless $db_is_ok;
# Checkets
my @checkits = getCheckitByName($self->config("checkit"));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Mowyw.pm view on Meta::CPAN
# print +($process ? '' : 'not '), "processing file $fn\n";
if ($process){
if ($config{make_behaviour} and -e $new_fn and (stat($fn))[9] < (stat($new_fn))[9]){
return;
}
print STDERR "Processing File '$fn'..." unless $config{quiet};
my $metadata = get_meta_data($fn);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MtAws/Command/Sync.pm view on Meta::CPAN
sub is_mtime_differs
{
my ($options, $journal_file, $absfilename) = @_;
my $mtime_differs = $options->{detect} =~ /(^|[-_])mtime([-_]|$)/ ? # don't make stat() call if we don't need it
defined($journal_file->{mtime}) && file_mtime($absfilename) != $journal_file->{mtime} :
undef;
}
# implements a '--detect' logic for file (with check of file size and mtime)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/MultiModule.pm view on Meta::CPAN
if($args{config_file}) {
$self->recur(repeat_interval => 1, work => sub {
eval {
die "App::MultiModule::new failed: optional passed argument config_file($args{config_file}) must either be a scalar and exist and be readable"
if ref $args{config_file} or not -r $args{config_file};
my $ctime = (stat($args{config_file}))[9];
$self->{last_config_stat} = 0
unless defined $self->{last_config_stat};
die "all good\n" if $ctime == $self->{last_config_stat};
$self->{last_config_stat} = $ctime;
$self->log("reading config from $args{config_file}");
lib/App/MultiModule.pm view on Meta::CPAN
#first: 'flush' all of the internal queues
for(1..5) { #lolwut
foreach my $task_name (@all_tasks) {
next unless $self->{tasks}->{$task_name};
IPC::Transit::local_queue(qname => $task_name);
my $stats = IPC::Transit::stat(
qname => $task_name,
override_local => _receive_mode_translate('local'));
next unless $stats->{qnum}; #nothing to receive
while( my $message = IPC::Transit::receive(
qname => $task_name,
lib/App/MultiModule.pm view on Meta::CPAN
sub _receive_messages_from {
my $self = shift;
my $qname = shift; my $receive_mode = shift;
my %args = @_;
IPC::Transit::local_queue(qname => $qname);
my $stats = IPC::Transit::stat(
qname => $qname,
override_local => _receive_mode_translate($receive_mode));
return unless $stats->{qnum}; #nothing to receive
#at this point, there are one or more messages for us to receive
#we can only deliver messages to tasks that are loaded AND configured
view all matches for this distribution