view release on metacpan or search on metacpan
bin/app-apache view on Meta::CPAN
$APACHEBASECONF = "$PREFIX/apache/conf/httpd.conf";
$APACHEBASECONF = "$APACHEROOT/conf/httpd.conf" if (! -f $APACHEBASECONF);
$baseconf_mtime = 0;
if (-f $APACHEBASECONF) {
@stat = stat($APACHEBASECONF);
$baseconf_mtime = $stat[9];
}
$APACHECONF = "$CONFDIR/httpd.conf";
$conf_mtime = 0;
if (-f $APACHECONF) {
@stat = stat($APACHECONF);
$conf_mtime = $stat[9];
}
if ($baseconf_mtime && (!$conf_mtime || ($conf_mtime < $baseconf_mtime))) {
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($conf_mtime);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CriticDB/DB.pm view on Meta::CPAN
}
sub _filemtime {
my ($fn)=@_;
if(!-e $fn) { return }
return (stat($fn))[9];
}
sub _fileNewer {
my ($self,$fn,$ts)=@_;
if(!$ts) { return }
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
scripts/dex view on Meta::CPAN
elsif ($type eq 'IO') {
if (defined $value) {
undef $value;
$value->{stat} = {};
if ($value->{fileno} = fileno(*{ $glob })) {
@{ $value->{stat} }{ @stats } = stat(*{ $glob });
$value->{tell} = tell *{ $glob };
}
}
}
$glob{ $type } = $value if defined $value;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DistSync.pm view on Meta::CPAN
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;
# Set TimeOut
my $to = _expire($props{timeout} // TIMEOUT);
croak("Can't use specified timeout") unless $to =~ /^[0-9]{1,11}$/;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DocKnot/Release.pm view on Meta::CPAN
$current_path->mkpath();
for my $file ($tarball_ref->{files}->@*) {
my $source = $self->{distdir}->child($file);
my $dest = $current_path->child($file);
$source->copy($dest);
my ($atime, $mtime) = $source->stat()->@[8, 9];
push(@times, $mtime);
utime($atime, $mtime, $dest)
or die "cannot reset timestamps of $dest: $!\n";
my $generic_name = $file;
$generic_name =~ s{ \A (\Q$self->{tarname}\E) - v?[\d.]+ [.] }{$1.}xms;
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/ElasticSearch/Utilities/Aggregations.pm view on Meta::CPAN
version 9.1
=head1 FUNCTIONS
=head2 is_single_stat()
Returns true if an aggregation returns a single value.
=head2 expand_aggregate_string( token )
view all matches for this distribution
view release on metacpan or search on metacpan
my $selected = $log->{selected} ? "*" : " ";
my $size = "-";
my $updated = "";
if (-e $log->{file}) {
$size = human_readable(-s $log->{file});
my $mtime = (stat($log->{file}))[9];
$updated = time_diff_str($mtime, $now);
}
my $file = $log->{file};
my $line = sprintf "%s %-60s %-10s %s", $selected, $file, $size, $updated;
print "$line\n";
for my $log (@logs) {
my $size = "-";
my $updated = "";
if (-e $log->{file}) {
$size = human_readable(-s $log->{file});
my $mtime = (stat($log->{file}))[9];
$updated = datestr($mtime) . " (" . time_diff_str($mtime, $now) . ")";
}
my $vhost = $log->{vhost};
print "$log->{file}\n";
if ($log->{selected}) {
print " format $log->{format}\n";
}
my $rotations = get_rotations($log->{file});
for my $r (@$rotations) {
my $size = human_readable(-s $r->{file});
my $mtime = (stat($r->{file}))[9];
my $updated = datestr($mtime) . " (" . time_diff_str($mtime, $now) . ")";
print " rotation $r->{name} $size $updated\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
share/status/test-web-server.js view on Meta::CPAN
return String.fromCharCode(parseInt(hex, 16));
});
var parts = path.split('/');
if (parts[parts.length-1].charAt(0) === '.')
return self.sendForbidden_(req, res, path);
fs.stat(path, function(err, stat) {
if (err)
return self.sendMissing_(req, res, path);
if (stat.isDirectory())
return self.sendDirectory_(req, res, path);
return self.sendFile_(req, res, path);
share/status/test-web-server.js view on Meta::CPAN
if (!files.length)
return self.writeDirectoryIndex_(req, res, path, []);
var remaining = files.length;
files.forEach(function(fileName, index) {
fs.stat(path + '/' + fileName, function(err, stat) {
if (err)
return self.sendError_(req, res, err);
if (stat.isDirectory()) {
files[index] = fileName + '/';
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/FQStat/Drawing.pm view on Meta::CPAN
if ($force or $time-$last_update > $::Interval) {
$last_update = $time;
$::ProgressIndicator++;
$::ProgressIndicator = 0
if $::ProgressIndicator >= scalar(@{::PROGRESS_INDICATORS()});
App::FQStat::Scanner::run_qstat($force);
}
cls();
::GetTermSize();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/FTNDB/Nodelist.pm view on Meta::CPAN
use File::Basename;
( $info{'FileName'}, $info{'FileDir'}, $info{'FileSuffix'} ) = fileparse($nodelist_file, qr/[^.]*/);
use File::stat;
my $fs = stat($nodelist_file);
# year of the converted timestamp is the fifth item
$info{'FileYear'} = (localtime($fs->mtime))[5] + 1900;
# yday of converted timestamp is the seventh item
$info{'FileYDay'} = (localtime($fs->mtime))[7] + 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/FTPServer/RO_FTPThis/Server.pm view on Meta::CPAN
# reject non-anonymous login
die "only anonymous ftp mode supported" unless $user_is_anon;
my $dir = $self->config("root directory");
my @st = stat($dir) or die "Can't stat '$dir': $!";
my @pw;
if ($st[4] == 0) {
@pw = getpwnam("nobody") or die "Can't get user nobody";
} else {
@pw = getpwuid($st[4]) or die "Can't get user with UID $st[4]";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Fasops/Command/stat.pm view on Meta::CPAN
if ( $opt->{outgroup} ) {
$out_seq = pop @{$seq_refs};
}
my $first_name = $full_names[0];
my $result = App::Fasops::Common::multi_seq_stat($seq_refs);
my $indel_sites = App::Fasops::Common::get_indels($seq_refs);
$csv->print( $out_fh, [ $first_name, @{$result}, scalar( @{$indel_sites} ) ] );
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Fetchware.pm view on Meta::CPAN
my $file_listing = shift;
for my $file (@$file_listing) {
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,
$blksize,$blocks)
= stat($file) or die <<EOD;
App-Fetchware: Fetchware failed to stat() the file [$file] while trying to parse
your local [file://] lookup_url. The OS error was [$!]. This should not happen,
and is either a bug in fetchware or some sort of race condition.
EOD
# Replace scalar filename with a arrayref of the filename with its
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/FileCleanerByDiskUage.pm view on Meta::CPAN
# building a separate array of path strings alongside the file info.
my @files_info;
File::Find::find(
sub {
# $_ is the basename (we are chdir'd into the containing dir),
# $File::Find::name is the full path. stat($_) populates the "_"
# handle so the -f test below reuses it rather than statting again.
my @stat = stat($_);
return unless @stat; # skip on stat failure (races, broken symlinks)
return unless -f _; # regular files only, matching the old ->file rule
return if defined($ignore_re) && $_ =~ $ignore_re; # ignore by basename
# blocks ($stat[12], 512-byte units) is the space actually freed by
# unlinking, used by the removal loop to estimate disk usage between
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Followme/FIO.pm view on Meta::CPAN
sub fio_get_date {
my ($filename) = @_;
my $date;
if (-e $filename) {
my @stats = stat($filename);
$date = $stats[9];
} else {
$date = time();
}
lib/App/Followme/FIO.pm view on Meta::CPAN
sub fio_get_size {
my ($filename) = @_;
my $size;
if (-e $filename) {
my @stats = stat($filename);
$size = $stats[7];
} else {
$size = 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
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
scripts/generate_index.pl view on Meta::CPAN
next unless $json->{summary}{Total};
my ($sha) = $file =~ /-(\w{7})\.json$/;
next unless $commit_messages{$sha}; # Skip merge commits
my $timestamp = $commit_times{$sha} // strftime('%Y-%m-%dT%H:%M:%S', localtime((stat($file))->mtime));
# Git log returns format like: "2024-01-15 14:30:45 -0500" or "2024-01-15 14:30:45 +0000"
# We need ISO 8601 format: "2024-01-15T14:30:45-05:00"
# Replace space between date and time with 'T'
scripts/generate_index.pl view on Meta::CPAN
} else {
push @html, "<a href=\"$cpan_api\">$cpan_api</a>: $res->{status} $res->{reason}";
}
my $timestamp = 'Unknown';
if (my $stat = stat($config{cover_db})) {
$timestamp = strftime('%Y-%m-%d %H:%M:%S', localtime($stat->mtime));
}
push @html, <<"HTML";
<footer>
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-id 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] };
script/_genpass-id view on Meta::CPAN
# atime mtime ctime blksize blocks);
# undef $value;
# $value->{stat} = YAML::Old::Node->new({});
# if ($value->{fileno} = fileno(*{$_[0]})) {
# local $^W;
# map {$value->{stat}{shift @stats} = $_} stat(*{$_[0]});
# $value->{tell} = tell(*{$_[0]});
# }
# }
# $ynode->{$type} = $value;
# }
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-wordlist 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] };
script/_genpass-wordlist view on Meta::CPAN
# atime mtime ctime blksize blocks);
# undef $value;
# $value->{stat} = YAML::Old::Node->new({});
# if ($value->{fileno} = fileno(*{$_[0]})) {
# local $^W;
# map {$value->{stat}{shift @stats} = $_} stat(*{$_[0]});
# $value->{tell} = tell(*{$_[0]});
# }
# }
# $ynode->{$type} = $value;
# }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GetClosestFile.pm view on Meta::CPAN
foreach my $file (@files) {
if ($file eq "." or $file eq "..") {
next;
}
stat($dirname . "/" . $file);
if (-d _) {
push @child_dirs, $dirname . "/" . $file;
} else {
if ($file =~ /$filename/) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitFind/Actions.pm view on Meta::CPAN
# delete
sub do_ls {
state $loaded = (require App::GitFind::FileStatLs, true);
print App::GitFind::FileStatLs::ls_stat($_[1]->path);
true
}
# TODO optimization? Pull the stat() results from $_[1] rather than
# re-statting. May not be an issue.
sub do_print {
say $_[0]->dot_relative_path($_[1]);
true
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/Glacier/Command/Put.pm view on Meta::CPAN
sub _upload {
my ($self, $vaultname, $localname, $remotename) = @_;
$remotename = basename($localname) unless defined($remotename);
my $st = stat($localname)
or $self->abend(EX_NOINPUT, "can't stat \"$localname\": $!");
unless (S_ISREG($st->mode)) {
$self->abend(EX_NOPERM, "\"$localname\" is not a regular file");
}
my $size = $st->size;
view all matches for this distribution