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/Config/Proxy/Base.pm view on Meta::CPAN
croak $err;
}
}
return 1 if $dry_run;
my $sb = stat($self->filename);
$self->backup;
rename($tempfile, $self->filename)
or croak "can't rename $tempfile to ".$self->tempfile.": $!";
# This will succeed: we've created the file, so we're owning it.
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/Config/Reload.pm view on Meta::CPAN
return $self->_config;
}
sub files_hash {
md5_hex( map { my @s = stat($_); ($_, $s[9], $s[7]) } sort @_ );
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
t/09_write_output.t view on Meta::CPAN
# 3. Test the file's *content*
my $file_content = slurp_file($temp_file);
is( $file_content, $expected_json, 'File content is correct' );
# 4. Test the file's *permissions*
# (stat($file))[2] returns the mode
my $mode = ( stat($temp_file) )[2] & 0777;
# A umask of 0077 on a file (default 0666) should be 0600
my $expected_mode = 0600; # (rw-------)
is( $mode, $expected_mode, 'File permissions are correctly set by umask 0077' );
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Scoped.pm view on Meta::CPAN
-line => $thisparser->_get_line(%args),
-text => "'$args{file}' can't stat cfg file/handle: $!"
)
unless stat $fh;
my ( $dev, $ino, $mode, $nlink, $uid, $gid ) = stat(_);
# owner is not root and not real uid
Config::Scoped::Error::Validate::Permissions->throw(
-file => $thisparser->_get_file(%args),
-line => $thisparser->_get_line(%args),
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
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/Config/XMLPerl.pm view on Meta::CPAN
sub config_load {
if ( my $doc = $CACHE{$_[0]} ) {
if ( (time-$CACHE_SLEEP) > $CACHE_DELAY ) {
my @stats = stat($_[0]) ;
if ( $doc->{s} != $stats[7] || $doc->{t} != $stats[9] ) {
$doc = undef ;
delete $CACHE{$_[0]} ;
}
}
lib/Config/XMLPerl.pm view on Meta::CPAN
) ;
$xml = $xml->cut_root ;
if ( $file ) {
my @stats = stat($file) ;
$CACHE{$file}{x} = $xml ;
$CACHE{$file}{s} = $stats[7] ;
$CACHE{$file}{t} = $stats[9] ;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Yak.pm view on Meta::CPAN
my $Config = Config::Tiny::->read($file);
print '_load_legacy_config - Loaded ' . $file . "\n" if $self->debug();
Data::Structure::Util::unbless($Config);
$cfg = Hash::Merge::merge( $cfg, $Config );
## no critic (ProhibitMagicNumbers)
my $last_ts = ( stat($file) )[9];
## use critic
$self->last_ts($last_ts) if $last_ts > $self->last_ts();
1;
} ## end try
catch {
lib/Config/Yak.pm view on Meta::CPAN
foreach my $file ( keys %{$cfg} ) {
print "_load_config - Loaded $file\n" if $self->debug();
push(@{$self->files_read()},$file);
$ccfg = Hash::Merge::merge( $ccfg, $cfg->{$file} );
## no critic (ProhibitMagicNumbers)
my $last_ts = ( stat($file) )[9];
## use critic
$self->last_ts($last_ts) if $last_ts > $self->last_ts();
} ## end foreach my $file ( keys %{$cfg...})
} ## end if ( ref($cfg) eq 'HASH')
return $ccfg;
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
lib/Container/Builder.pm view on Meta::CPAN
$tar->add_dir($prefix_path, $mode, $user, $group);
until($iterator->done) {
my $item = $iterator->next;
if($item->is_dir()) {
my $remote_dir = $prefix_path . substr($item, length($local_dirpath));
my $mode = (stat($item))[2] & 07777;
$tar->add_dir($remote_dir, $mode, $user, $group);
} else {
my $remote_file = $prefix_path . substr($item, length($local_dirpath));
my $mode = (stat($item))[2] & 07777;
local $/ = undef;
open(my $file, '<', $item) or die "cannot open file $item for reading\n";
my $data = <$file>;
$tar->add_file($remote_file, $data, $mode, $user, $group);
}
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/Convert/Binary/C/Cached.pm view on Meta::CPAN
while (my($file, $spec) = each %{$config{files}}) {
unless (-e $file) {
$ENV{CBCC_DEBUG} and print STDERR "CBCC: file '$file' deleted\n";
return 0;
}
my($size, $mtime, $ctime) = (stat(_))[7,9,10];
unless ($spec->{size} == $size and
$spec->{mtime} == $mtime and
$spec->{ctime} == $ctime) {
$ENV{CBCC_DEBUG} and print STDERR "CBCC: size/mtime/ctime of '$file' changed\n";
return 0;
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
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/Cookie/Domain.pm view on Meta::CPAN
=head1 SYNOPSIS
use Cookie::Domain;
my $dom = Cookie::Domain->new( min_suffix => 1, debug => 3 ) ||
die( Cookie::Domain->error, "\n" );
my $res = $dom->stat( 'www.example.or.uk' ) || die( $dom->error, "\n" );
# Check for potential errors;
die( $dom->error ) if( !defined( $res ) );
# stat() returns an empty string if nothing was found and undef upon error
print( "Nothing found\n" ), exit(0) if( !$res );
print( $res->domain, "\n" ); # example.co.uk
print( $res->name, "\n" ); # example
print( $res->sub, "\n" ); # www
print( $res->suffix, "\n" ); # co.uk
lib/Cookie/Domain.pm view on Meta::CPAN
=item C<undef()>
If an error occurred.
my $rv = $d->stat( 'www.example.org' );
die( "Error: ", $d->error ) if( !defined( $rv ) );
=item empty string
If there is no data available such as when querying a non existing top level domain.
lib/Cookie/Domain.pm view on Meta::CPAN
The label that immediately follows the suffix (i.e. on its lefthand side).
For example, in C<www.example.org>, the I<name> would be C<example>
my $res = $dom->stat( 'www.example.org' ) || die( $dom->error );
say $res->{name}; # example
# or alternatively
say $res->name; # example
=item I<sub>
The sub domain or sub domains that follows the domain on its lefthand side.
For example, in C<www.paris.example.fr>, C<www.paris> is the I<sub> and C<example> the I<name>
my $res = $dom->stat( 'www.paris.example.fr' ) || die( $dom->error );
say $res->{sub}; # www.paris
# or alternatively
say $res->sub; # www.paris
=item I<suffix>
The top level domain or I<suffix>. For example, in C<example.com.sg>, C<com.sg> is the suffix and C<example> the I<name>
my $res = $dom->stat( 'example.com.sg' ) || die( $dom->error );
say $res->{suffix}; # com.sg
# or alternatively
say $res->suffix; # com.sg
What constitute a suffix varies from zone to zone or country to country, hence the necessity of this public domain suffix data file.
=back
C<Cookie::Domain::Result> objects inherit from L<Module::Generic::Hash>, thus you can do:
my $res = $dom->stat( 'www.example.org' ) || die( $dom->error );
say $res->length, " properties set.";
# which should say 3 since we alway return suffix, name and sub
The following additional method is also available as a convenience:
lib/Cookie/Domain.pm view on Meta::CPAN
=item I<domain>
This is a read only method which returns and empty L<Module::Generic::Scalar> object if the I<name> property is empty, or the properties I<name> and I<suffix> join by a dot '.' and returned as a new L<Module::Generic::Scalar> object.
my $res = $dom->stat( 'www.example.com.sg' ) || die( $dom->error );
say $res->domain; # example.com.sg
say $res->domain->length; # 14
=back
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
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
xs/perl-couchbase-async.h view on Meta::CPAN
Operation requests will involve a user-defined 'opaque' data object (SV*),
and is asynchronously batched to libcouchbase_* functions.
The cookies for these functions are special. A cookie will have a hashref
in which it will store a Couchbase::Client::Return object for each key.
(in the case of stat(), which is only a single command, a pseudo-key will be
used TBC..)
Additionally, the cookie will have a counter which will decrement for each
response received. When the counter reaches 0, it means all the responses have
been received.
view all matches for this distribution