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/Pfind.pm view on Meta::CPAN
# Perform a real-stat or just reads the result from the previous stat. Returns
# just the mode part of the stat.
my $last_stated_file = '';
sub cheap_stat {
my ($relative_file_name, $full_file_name) = @_;
return (stat(_))[2] if $full_file_name eq $last_stated_file;
$last_stated_file = $full_file_name;
# When executing find in follow mode, the current file has already been
# stat-ed (this is guaranteed by find), so we can re-use the value using `_`.
return (stat(_))[2] if $options{follow} || $options{follow_fast};
return (stat($relative_file_name))[2];
}
my %file_mode = (
f => S_IFREG, # regular file
d => S_IFDIR, # directory
lib/App/Pfind.pm view on Meta::CPAN
);
sub should_skip_file {
my ($relative_file_name, $full_file_name) = @_;
return 0 unless %{$options{type}};
my $mode = cheap_stat($relative_file_name, $full_file_name);
for my $m (keys(%{$options{type}})) {
if (($mode & $file_mode{$m}) xor $options{type}{$m}) {
print STDERR "Skipping '$full_file_name' due to '$m' type" if $options{verbose};
return 1;
}
lib/App/Pfind.pm view on Meta::CPAN
bydepth => $options{depth_first},
follow => $options{follow},
follow_fast => $options{follow_fast},
no_chdir => !$options{chdir},
wanted => sub {
if (not $options{recurse} and cheap_stat($_, $File::Find::name) & S_IFDIR) {
print "Will not recurse into $File::Find::name" if $options{verbose};
$File::Find::prune = 1;
}
print STDERR "Looking at file: $File::Find::name" if $options{verbose};
return if should_skip_file($_, $File::Find::name);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Phoebe.pm view on Meta::CPAN
my ($sec, $min, $hour, $mday, $mon, $year) = gmtime(shift);
return sprintf('%02d:%02d UTC', $hour, $min);
}
sub modified {
my $ts = (stat(shift))[9];
return $ts;
}
sub serve_history {
my $stream = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
script/_pick view on Meta::CPAN
# my $filter;
# if ($args{filter} && !ref($args{filter})) {
# my @seqs = split /\s*\|\s*/, $args{filter};
# $filter = sub {
# my $name = shift;
# my @st = stat($name) or return 0;
# my $mode = $st[2];
# my $pass;
# SEQ:
# for my $seq (@seqs) {
# my $neg = sub { $_[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
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
t/cpan/Mojo2/File.pm view on Meta::CPAN
return Mojo::Collection->new( map { $self->new( canonpath $_) }
sort keys %all );
}
sub lstat { File::stat::lstat( ${ shift() } ) }
sub make_path {
my $self = shift;
File::Path::make_path $$self, @_;
return $self;
t/cpan/Mojo2/File.pm view on Meta::CPAN
( $file->syswrite( $content ) // -1 ) == length $content
or croak qq{Can't write to file "$$self": $!};
return $self;
}
sub stat { File::stat::stat( ${ shift() } ) }
sub tap { shift->Mojo::Base::tap( @_ ) }
sub tempdir { __PACKAGE__->new( File::Temp->newdir( @_ ) ) }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Pods2Site/Pod2HTML.pm view on Meta::CPAN
my $relOutFile = "pod2html/$outfile.html";
$outfile = slashify($args->getSiteDir() . "/$relOutFile");
$workGroup->{podinfo}->{$podName}->{htmlfile} = $outfile;
my $mtimePodfile = (stat($podfile))[9];
my $mtimeOutfile = (stat($outfile))[9] || 0;
if (!-e $outfile || $mtimePodfile > $mtimeOutfile)
{
my $outfileDir = dirname($outfile);
(!-d $outfileDir ? make_path($outfileDir) : 1) || die ("Failed to create directory '$outfileDir': $!\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
die "Not a regular file: $path\n" if -e $path && !-f $path;
my $same = defined($s->{path}) && File::Spec->rel2abs($path) eq File::Spec->rel2abs($s->{path});
my $expected = $same ? $s->{fingerprint} : '';
my $current = fingerprint($path);
die "File exists or changed on disk; use :w! to overwrite\n" if !$force && $current ne $expected;
my @stat = stat($path);
die "File has multiple hard links; refusing atomic replacement\n" if @stat && $stat[3] > 1;
die "File is read-only\n" if @stat && !($stat[2] & 0222);
my ($fh, $tmp) = tempfile('.pvim-save-XXXXXX', DIR => dirname(File::Spec->rel2abs($path)), UNLINK => 0);
binmode $fh;
my $ok = eval {
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/Regather.pm view on Meta::CPAN
App::Regather::Config ( filename => $self->{_opt}{config},
logger => $self->{_opt}{l},
cli => $self->{_opt}{cli},
verbose => $self->{_opt}{v} );
my $cf_mode = (stat($self->{_opt}{config}))[2] & 0777;
my $fm_msg;
if ( $cf_mode & 002 || $cf_mode & 006 ) {
$fm_msg = 'world';
} elsif ( $cf_mode & 020 || $cf_mode & 060) {
$fm_msg = 'group';
lib/App/Regather.pm view on Meta::CPAN
if ( kill(0, $pid) ) {
print "Doing nothing\npidfile $self->cf->get(qw(core pid_file)) of the proces with pid $pid, exists and the very process is alive\n\n";
exit 1;
}
$orphaned_pid_mtime = strftime( $self->o('ts_fmt'), localtime( (stat( $self->cf->get(qw(core pid_file)) ))[9] ));
if ( unlink $self->cf->get(qw(core pid_file)) ) {
$self->l->cc( pr => 'debug', fm => "%s:%s: orphaned %s was removed",
ls => [ __FILE__,__LINE__, $self->cf->get(qw(core pid_file)) ] )
if $self->o('v') > 0;
} else {
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/Saisons/UI.pm view on Meta::CPAN
my @files;
push @files, $session->{_file} if $session->{_file} && -f $session->{_file};
if (my $dir = $session->{_dir}) {
push @files, _find_jsonl_files($dir);
}
@files = sort { ((stat($b))[9] // 0) <=> ((stat($a))[9] // 0) } @files;
my @rows;
my $found = 0;
for my $file (@files) {
last if $found >= MAX_MATCH_LINES;
open my $fh, '<', $file or next;
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/SeismicUnixGui/misc/manage_files_by.pm view on Meta::CPAN
# default situation is to have a file that is empty
my $answer = 1;
# find status of file to see whether it is empty
#$fsize[1] = (stat($$ref_file))[2];
#print("\nfile is: $$ref_file\n");
# -s is for size
#verified by JL
my $j = ( -s $$ref_file );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
}
while(my($full_path, $dir2upd) = each %dirs2upd) {
print "Updating dir $full_path..." if $options->{verbose};
my $file = $files->find_by_parent_id_name($dir2upd->{parent_id}, $dir2upd->{filename});
my @stat = lstat($full_path);
if(@stat and $file->{versions}->[-1]->{backup_id_max} != $state->{last_backup_id}) {
my($uid, $gid) =_proc_uid_gid($stat[4], $stat[5], $state->{db}->{uids_gids});
if($file->{versions}->[-1]->{backup_id_max} == $state->{last_backup_id} - 1) {
$file->{versions}->[-1] = {
%{ $file->{versions}->[-1] },
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
}
$state->{profile}->{fs} -= time;
$state->{profile}->{fs_lstat} -= time;
$file_time_spent -= time;
my @stat = lstat($task->[0]);
$file_time_spent += time;
$state->{profile}->{fs} += time;
$state->{profile}->{fs_lstat} += time;
if(! @stat) {
print ". Not exists\n" if $options->{verbose};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Slaughter/API/generic.pm view on Meta::CPAN
#
my ( $dev, $ino, $mode, $nlink, $orig_uid,
$orig_gid, $rdev, $size, $atime, $mtime,
$ctime, $blksize, $blocks
)
= stat($file);
$::verbose && print "\tSetting owner to $owner/$uid\n";
chown( $uid, $orig_gid, $file );
$changed += 1;
lib/Slaughter/API/generic.pm view on Meta::CPAN
#
my ( $dev, $ino, $mode, $nlink, $orig_uid,
$orig_gid, $rdev, $size, $atime, $mtime,
$ctime, $blksize, $blocks
)
= stat($file);
$::verbose && print "\tSetting group to $group/$gid\n";
chown( $orig_uid, $gid, $file );
$changed += 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SlideServer.pm view on Meta::CPAN
$content= $self->markdown_to_html($content, %opts)
unless $content =~ /^\s*</;
$change_token= (0+$srcfile) .'_'. tell($srcfile);
}
else {
my $st= stat($srcfile)
or croak "Can't stat '$srcfile'";
return undef
if defined $opts{if_changed} && $st->mtime == $opts{if_changed};
$content= path($srcfile)->slurp;
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
# 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