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/Class/Refresh.pm view on Meta::CPAN
sub _mtime {
my $class = shift;
my ($file) = @_;
$file = $class->_mod_to_file($file);
return 1 if !$INC{$file};
return join ' ', (stat($INC{$file}))[1, 7, 9];
}
sub _file_to_mod {
my $class = shift;
my ($file) = @_;
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/Claude/Agent/MCP/SDKRunner.pm view on Meta::CPAN
#
# FOR HIGH-SECURITY DEPLOYMENTS: Set CLAUDE_AGENT_IGNORE_TMPDIR=1
#
# Additional mitigations:
# 1. Set CLAUDE_AGENT_IGNORE_TMPDIR=1 to ignore TMPDIR entirely (RECOMMENDED)
# 2. Validate socket ownership with stat() before connecting
# 3. Use only fixed prefixes by not setting TMPDIR
# 4. Run in a restricted environment where TMPDIR cannot be manipulated
# 5. Set TMPDIR to a trusted directory (e.g., /tmp) before process startup
# Only allow TMPDIR when explicitly enabled via CLAUDE_AGENT_ALLOW_TMPDIR=1
# This is opt-in for stricter security - TMPDIR could be attacker-controlled
lib/Claude/Agent/MCP/SDKRunner.pm view on Meta::CPAN
my %tool_by_name = map { $_->{name} => $_ } @$tools;
# Validate socket ownership before connecting (defense-in-depth)
# This helps detect if an attacker has replaced the socket with one they control
{
my @stat_info = stat($socket_path);
if (@stat_info) {
my $socket_uid = $stat_info[4];
if ($socket_uid != $<) {
die "Security error: socket '$socket_path' is owned by uid $socket_uid, expected uid $< (current user)\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/cscomp view on Meta::CPAN
} $ct->argv('lsview', 'em*')->qx;
my %v;
foreach (@view) {
my $tag = $_->[0];
my $stg = $_->[1];
if (!($acc = (stat(catdir($stg, '.access_info')))[10])) {
print "Pb with last access time on $tag\n"; next; }
next if $acc < $weekago;
if (!($cmp = (stat(catdir($stg, '.compiled_spec')))[10])) {
print "Pb with compilation time on $tag\n"; next; }
$v{$tag} = $cmp;
}
print "Views accessed last week, sorted by compile time:\n";
foreach (sort { $v{$b} <=> $v{$a} } keys %v) {
view all matches for this distribution
view release on metacpan or search on metacpan
exit 0;
}
# Shared DO's should be g+w!
(my $egid = $)) =~ s%\s.*%%;
for (keys %set) {
my($mode, $uid, $gid) = (stat($_))[2,4,5];
if (!defined($mode)) {
warn Msg('W', "no such file: $_");
delete $set{$_};
next;
}
view all matches for this distribution
view release on metacpan or search on metacpan
extra/fixsrccnt view on Meta::CPAN
last;
}
}
return unless $ver;
$cnt[2] = "^B $oidbr $brid $ver\n";
my $perm = (stat($f))[2];
chmod($perm | 0600, $f) or return;
write_file($f, @cnt);
chmod($perm, $f);
}
view all matches for this distribution
view release on metacpan or search on metacpan
src/CFCTest.c view on Meta::CPAN
}
time_t
CFCTest_get_file_mtime(const char *path) {
struct stat buf;
if (stat(path, &buf)) {
CFCUtil_die("Can't stat '%s': %s", path, strerror(errno));
}
return buf.st_mtime;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cluster/Init/Conf.pm view on Meta::CPAN
warn "file not found: $cltab\n";
$self->{msg}="file not found: $cltab\n";
$self->{ok}=1;
return $self->{ok};
}
my $mtime=(stat($cltab))[9] || die $!;
$self->{'cltab_mtime'} = 0 unless $self->{'cltab_mtime'};
return $self->{ok} unless $mtime > $self->{'cltab_mtime'};
$self->{'cltab_mtime'} = $mtime;
debug "reading cltab $cltab, PWD is $ENV{PWD}";
my @tag;
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/Devel/CheckOS.pm view on Meta::CPAN
$re_AssertOS = qr/$case_flag ^AssertOS$/x;
}
# sort by mtime, so oldest last
my @modules = sort {
(stat($a->{file}))[9] <=> (stat($b->{file}))[9]
} map {
my (undef, $dir_part, $file_part) = File::Spec->splitpath($_);
$file_part =~ s/\.pm$//;
my (@dirs) = grep {+length} File::Spec->splitdir($dir_part);
foreach my $i (reverse 1..$#dirs) {
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/Code/ART.pm view on Meta::CPAN
"\${^UTF8CACHE}" =>
{ aliases => {}, desc => "Internal UTF-8 offset caching controls" },
"\${^UTF8LOCALE}" => { aliases => {}, desc => "UTF-8 locale" },
"\${^WARNING_BITS}" => { aliases => {}, desc => "Lexical warning flags" },
"\${^WIN32_SLOPPY_STAT}" =>
{ aliases => {}, desc => "Use non-opening stat() under Windows" },
"\$|" => {
aliases => { "\$OUTPUT_AUTOFLUSH" => 1 },
desc => "Autoflush status of selected output filehandle",
},
"\$~" => {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Code/DRY.pm view on Meta::CPAN
my $here = 0;
for my $file (@{$rfiles}) {
next if (!defined $file || $file eq '');
# check metadata
if ($^O ne 'MSWin32') {
my @statresult = stat($file);
if (0 < $#statresult) {
my $inode = $statresult[1]; # inode
if (exists $filename2inode{$inode}) {
$file = undef;
next; # avoid hard and symbolic links
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/Code/Statistics/App/Command.pm view on Meta::CPAN
use App::Cmd::Setup -command;
sub cstat {
return shift->app->cstat( @_ );
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Code/TidyAll.pm view on Meta::CPAN
$self->msg('purging old backups') if $self->verbose;
find(
{
follow => 0,
wanted => sub {
unlink $_ if -f && /\.bak$/ && time > ( stat($_) )[9] + $self->_backup_ttl_secs;
},
no_chdir => 1
},
$self->_backup_dir,
);
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
# 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
lib/Colloquy/Data.pm view on Meta::CPAN
my $file = shift;
croak "No such file '$file'\n" unless -e $file;
croak "'$file' is not a plain file type\n" unless -f _;
croak "Insufficient permissions to read file '$file'\n" unless -r _;
my $mode = (stat(_))[2];
my $group_write = ($mode & S_IWGRP) >> 3;
my $other_write = $mode & S_IWOTH;
# Since this module started using Safe to parse the data files,
# this code is no longer as important as before. It's now only
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Comics.pm view on Meta::CPAN
@files =
map { $_->[0] }
sort { $b->[1] <=> $a->[1] }
grep { $force || ! $state->{comics}->{$_->[2]}->{disabled} }
map { ( my $t = $_ ) =~ s/\.\w+$//;
[ $_, (stat($_))[9], $t ] }
@files;
if ( $debug > 1 ) {
warn("Images (sorted):\n");
warn(" $_\n") for @files;
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