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
example/file.pl view on Meta::CPAN
# Returns a string showing the entry permissions (a la ls -l)
#
# Usage: $mode = transmode($file);
my $file = shift;
my $stat = (stat($file))[2];
my $mode = defined $stat ? sprintf('%04o', $stat & 07777) : '0000';
my @ebits = qw(r w x);
my @bits = (4, 2, 1);
my ($digit, $i, $rv);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cyrillic.pm view on Meta::CPAN
# Filter >>>
# Source >
# Escape >>>>> executable without re-escape
#----------------------------------------------------
my $mtime_filter = (stat(__FILE__ ))[9];
my $mtime_source = (stat($filename ))[9];
my $mtime_escape = (stat("$filename.e"))[9];
if (($mtime_escape < $mtime_source) or ($mtime_escape < $mtime_filter)) {
unlink "$filename.e";
}
}
}
lib/Cyrillic.pm view on Meta::CPAN
seek($fh, 0, 0) or die __FILE__, ": Can't seek file: $filename.e\n";
my $e_script = Cyrillic::escape_script($filename);
print {$fh} $e_script;
my $mode = (stat($filename))[2] & 0777;
chmod $mode, "$filename.e";
close($fh) or die "Can't close file: $filename.e: $!";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/D64/Disk/Image.pm view on Meta::CPAN
die "$name file does not exist" unless -e $name;
open PRG, '<:bytes', $name or die "Couldn't open $name file for reading";
# Write data to file:
my $buffer;
my $filesize = (stat($name))[7];
sysread PRG, $buffer, $filesize;
my $size = $prg->write($buffer);
printf "Wrote %d bytes to %s\n", $size, $disk_3;
# Close files:
view all matches for this distribution
view release on metacpan or search on metacpan
t/02-inherit.t view on Meta::CPAN
#########################
{
my $diskLayoutObj = D64::MyLayout->new();
my $filename = tmpnam() . '.d64';
my $saveOK = $diskLayoutObj->save_as($filename);
my $mtime_create = (stat($filename))[9];
sleep 2;
$diskLayoutObj = D64::MyLayout->new($filename);
$saveOK = $diskLayoutObj->save();
my $mtime_modify = (stat($filename))[9];
cmp_ok($mtime_create, '!=', $mtime_modify, 'save - overwrite file loaded during object instance initialization');
unlink($filename);
}
#########################
view all matches for this distribution
view release on metacpan or search on metacpan
##
# Number of attributes
#
sub attributes_number ($)
{ my $self=shift;
ag_db_stat($$self,-1,-1);
}
##
# Number of values
#
sub values_number($%)
{ my $self=shift;
my $args=get_args(\@_);
my $attr=$args->{attribute} || $args->{attr} || 0;
ag_db_stat($$self,$attr,-1);
}
##
# Length of field
#
sub value_length ($%)
{ my $self=shift;
my $args=get_args(\@_);
my $attr=$args->{attribute} || $args->{attr} || 0;
my $value=$args->{value} || $args->{val} || 0;
ag_db_stat($$self,$attr,$value);
}
##
# Deletes value
#
order locking it if required. Returns key text or undef if no more
records exist.
=head1 FIELD LEVEL METHODS
=head2 ag_db_stat($db, $attr, $value);
This method determines the size and composition of a field in the
I<current record>. Consult appgen documentation for details.
A number of methods exists to get the same functionality in more
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/DB/Object.pm view on Meta::CPAN
my $sth = $repo->{sth} || return( '' );
# A DB::Object::Statement object
my $qo = $sth->query_object;
return( '' ) if( !CORE::length( $def->{file} ) );
return( '' ) if( !-e( $def->{file} ) );
return( '' ) if( ( CORE::stat( $def->{file} ) )[9] != $ts );
return( $self->error( "Query object retrieved from constant query cache is void!" ) ) if( !$qo );
return( $self->error( "Query object retrieved from constant query cache is not a DB::Object::Query object or one of its sub classes." ) ) if( !$self->_is_object( $qo ) || !$qo->isa( 'DB::Object::Query' ) );
return if( $self->database ne $qo->database_object->database );
return( $sth );
lib/DB/Object.pm view on Meta::CPAN
!$def->{query_object}->isa( 'DB::Object::Query' ) )
{
return( $self->error( "Provided query object is not a DB::Object::Query." ) );
}
$def->{ts} = [CORE::stat( $def->{file} )]->[9];
my $cache_key = CORE::join( '|', @$def{qw( pack file line )} );
my $serialiser = CORE::delete( $def->{serialiser} ) || $DB::Object::SERIALISER || 'Storable';
my $repo = Module::Generic::Global->new( queries_cache => $base_class,
view all matches for this distribution
view release on metacpan or search on metacpan
c/speedyb.c view on Meta::CPAN
bzero(dbh, sizeof(dbh_t));
if((dbh->fd = open(fn, O_RDONLY)) < 0) {
ERETURN(SPEEDYB_EOPEN);
}
if(stat(fn, &statbuf)) {
ERETURN(SPEEDYB_EOPEN);
}
if(MAP_FAILED == (db = mmap(NULL, statbuf.st_size, PROT_READ, MAP_SHARED, dbh->fd, 0))) {
ERETURN(SPEEDYB_EOPEN);
}
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
else {
$opts{INC} = "-I. -I$incdir $opts{INC}";
$libname =~ s/^lib//;
$libname =~ s/\.a|\.so&//;
$opts{LIBS} = " -L$libdir -l$libname -lm";
# Because unable to resolve stat()
if ($^O eq "linux") {
$opts{LIBS} = $opts{LIBS}." -lc";
}
}
view all matches for this distribution