view release on metacpan or search on metacpan
lib/Bencher/Backend.pm view on Meta::CPAN
$envres->[3]{'func.bencher_version'} = $Bencher::VERSION;
$envres->[3]{'func.bencher_args'} = {
map {$_=>$args{$_}} grep {!/\A-/} keys %args};
if ($args{scenario_file}) {
$envres->[3]{'func.scenario_file'} = $args{scenario_file};
my @st = stat($args{scenario_file});
$envres->[3]{'func.scenario_file_mtime'} = $st[9];
my $digests = _digest($args{scenario_file});
$envres->[3]{'func.scenario_file_md5sum'} = $digests->{md5};
$envres->[3]{'func.scenario_file_sha1sum'} = $digests->{sha1};
$envres->[3]{'func.scenario_file_sha256sum'} = $digests->{sha256};
lib/Bencher/Backend.pm view on Meta::CPAN
no strict 'refs'; ## no critic: TestingAndDebugging::ProhibitNoStrict
$mod = "Bencher::Scenario::$mod" unless $mod =~ /\ABencher::Scenario::/;
$envres->[3]{'func.scenario_module'} = $mod;
(my $mod_pm = "$mod.pm") =~ s!::!/!g;
$INC{$mod_pm} or die "BUG: Can't find '$mod_pm' in \%INC";
my @st = stat($INC{$mod_pm});
$envres->[3]{'func.scenario_module_mtime'} = $st[9];
my $digests = _digest($INC{$mod_pm});
$envres->[3]{'func.scenario_module_md5sum'} = $digests->{md5};
$envres->[3]{'func.scenario_module_sha1sum'} = $digests->{sha1};
$envres->[3]{'func.scenario_module_sha256sum'} = $digests->{sha256};
lib/Bencher/Backend.pm view on Meta::CPAN
} elsif (my $mod0 = $args{cpanmodules_module}) {
no strict 'refs'; ## no critic: TestingAndDebugging::ProhibitNoStrict
my $mod = "Acme::CPANModules::$mod0";
$envres->[3]{'func.cpanmodules_module'} = $mod;
(my $mod_pm = "$mod.pm") =~ s!::!/!g;
my @st = stat($INC{$mod_pm});
$envres->[3]{'func.cpanmodules_module_mtime'} = $st[9];
my $digests = _digest($INC{$mod_pm});
$envres->[3]{'func.cpanmodules_module_md5sum'} = $digests->{md5};
$envres->[3]{'func.cpanmodules_module_sha1sum'} = $digests->{sha1};
$envres->[3]{'func.cpanmodules_module_sha256sum'} = $digests->{sha256};
view all matches for this distribution
view release on metacpan or search on metacpan
share/PerlCritic/Critic/Policy/Variables/ProhibitPunctuationVars.pm view on Meta::CPAN
=head1 CONFIGURATION
The scratch variables C<$_> and C<@_> are very common and are pretty
well understood, so they are exempt from this policy. The same goes
for the less-frequently-used default filehandle C<_> used by stat().
All the regexp capture variables (C<$1>, C<$2>, ...) are exempt too.
C<$]> is exempt because there is no L<English|English> equivalent and
L<Module::CoreList|Module::CoreList> is based upon it.
You can add more exceptions to your configuration. In your
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
# 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
BerkeleyDB.pod view on Meta::CPAN
$status = $db->db_put() ;
$status = $db->db_del() ;
$status = $db->db_sync() ;
$status = $db->db_close() ;
$status = $db->db_pget()
$hash_ref = $db->db_stat() ;
$status = $db->db_key_range();
$type = $db->type() ;
$status = $db->status() ;
$boolean = $db->byteswapped() ;
$status = $db->truncate($count) ;
BerkeleyDB.pod view on Meta::CPAN
$status = $stream->size($S);
$status = $stream->read($data, $offset, $size);
$status = $stream->write($data, $offset);
$status = $env->txn_checkpoint()
$hash_ref = $env->txn_stat()
$status = $env->set_mutexlocks()
$status = $env->set_flags()
$status = $env->set_timeout()
$status = $env->lock_detect()
$status = $env->lsn_reset()
BerkeleyDB.pod view on Meta::CPAN
$old_filter = $db->filter_fetch_value( sub { ... } ) ;
# deprecated, but supported
$txn_mgr = $env->TxnMgr();
$status = $txn_mgr->txn_checkpoint()
$hash_ref = $txn_mgr->txn_stat()
$txn = $txn_mgr->txn_begin() ;
=head1 DESCRIPTION
B<NOTE: This document is still under construction. Expect it to be
BerkeleyDB.pod view on Meta::CPAN
=item $env->txn_begin()
TODO
=item $env->txn_stat()
TODO
=item $env->txn_checkpoint()
BerkeleyDB.pod view on Meta::CPAN
Note that if multiple CDS lock objects are created, the underlying write
lock will not be released until all CDS lock objects are either explicitly
unlocked with this method, or the CDS lock objects have been destroyed.
=head2 $ref = $db->db_stat()
Returns a reference to an associative array containing information about
the database. The keys of the associative array correspond directly to the
names of the fields defined in the Berkeley DB documentation. For example,
in the DB documentation, the field B<bt_version> stores the version of the
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/Big5.pm view on Meta::CPAN
# Filter >>>
# Source >
# Escape >>>>> executable without re-escape
#----------------------------------------------------
my $mtime_filter = (Ebig5::stat(__FILE__ ))[9];
my $mtime_source = (Ebig5::stat($filename ))[9];
my $mtime_escape = (Ebig5::stat("$filename.e"))[9];
if (($mtime_escape < $mtime_source) or ($mtime_escape < $mtime_filter)) {
Ebig5::unlink "$filename.e";
}
}
}
lib/Big5.pm view on Meta::CPAN
seek($fh, 0, 0) or die __FILE__, ": Can't seek file: $filename.e\n";
my $e_script = Big5::escape_script($filename);
print {$fh} $e_script;
my $mode = (Ebig5::stat($filename))[2] & 0777;
chmod $mode, "$filename.e";
close($fh) or die "Can't close file: $filename.e: $!";
}
lib/Big5.pm view on Meta::CPAN
support these.
=item * ${^WIN32_SLOPPY_STAT} is ignored
Even if ${^WIN32_SLOPPY_STAT} is set to a true value, file test functions Ebig5::*(),
Ebig5::lstat(), and Ebig5::stat() on Microsoft Windows open the file for the path
which has chr(0x5c) at end.
=item * Delimiter of String and Regexp
qq//, q//, qw//, qx//, qr//, m//, s///, tr///, and y/// can't use a wide character
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Big5HKSCS.pm view on Meta::CPAN
# Filter >>>
# Source >
# Escape >>>>> executable without re-escape
#----------------------------------------------------
my $mtime_filter = (Ebig5hkscs::stat(__FILE__ ))[9];
my $mtime_source = (Ebig5hkscs::stat($filename ))[9];
my $mtime_escape = (Ebig5hkscs::stat("$filename.e"))[9];
if (($mtime_escape < $mtime_source) or ($mtime_escape < $mtime_filter)) {
Ebig5hkscs::unlink "$filename.e";
}
}
}
lib/Big5HKSCS.pm view on Meta::CPAN
seek($fh, 0, 0) or die __FILE__, ": Can't seek file: $filename.e\n";
my $e_script = Big5HKSCS::escape_script($filename);
print {$fh} $e_script;
my $mode = (Ebig5hkscs::stat($filename))[2] & 0777;
chmod $mode, "$filename.e";
close($fh) or die "Can't close file: $filename.e: $!";
}
lib/Big5HKSCS.pm view on Meta::CPAN
support these.
=item * ${^WIN32_SLOPPY_STAT} is ignored
Even if ${^WIN32_SLOPPY_STAT} is set to a true value, file test functions Ebig5hkscs::*(),
Ebig5hkscs::lstat(), and Ebig5hkscs::stat() on Microsoft Windows open the file for the path
which has chr(0x5c) at end.
=item * Delimiter of String and Regexp
qq//, q//, qw//, qx//, qr//, m//, s///, tr///, and y/// can't use a wide character
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/Bio/BLAST/Database.pm view on Meta::CPAN
sub file_modtime {
my $this = shift;
my ($basename,$ext) = $this->full_file_basename;
my $db_mtime = min( map { (stat($_))[9] } $this->list_files );
return $db_mtime;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/ConnectDots/scripts/update_connectorsets.pl view on Meta::CPAN
# recieves a file and returns hashref of day,month,year it was last modified in the local file system
sub get_file_date {
my ($filename) = @_;
my %out;
open(FILE,$filename) or die "Can not open $filename\n";
my $stat = stat($filename);
my $lastmodified = $stat->mtime;
my @times = localtime($lastmodified);
$out{day} = $times[3];
$out{month} = $times[4];
$out{year} = $times[5]+1900;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/DB/GFF/Adaptor/berkeleydb.pm view on Meta::CPAN
return $loaded;
}
sub _mtime {
my $file = shift;
my @stat = stat($file);
return $stat[9];
}
sub _index_file {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/DB/HTS.pm view on Meta::CPAN
$result;
}
sub mtime {
my $path = shift;
( stat($path) )[9];
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/DB/SeqFeature/Store/berkeleydb.pm view on Meta::CPAN
}
sub _mtime {
my $file = shift;
my @stat = stat($file);
return $stat[9];
}
# return names of all the indexes
sub _index_files {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Das/ProServer/SourceAdaptor/Transport/csv.pm view on Meta::CPAN
return File::Spec->catfile( $self->dbname(), $self->tablename() );
}
sub last_modified {
my $self = shift;
return stat( $self->filename() )->mtime;
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
Das/Segment.pm view on Meta::CPAN
my $stylesheet;
eval {
# cache for 5 minutes
my $mtime = (stat($path))[9];
if ($mtime && ((time() - $mtime)/60) < 5.0) {
open my $f,'<',$path or die "$path: $!";
my $s;
$s .= $_ while <$f>;
close $f;
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
GMOD/Util/CheckVersions.pm view on Meta::CPAN
sub read_symlink {
my ($self,$path) = @_;
my $realdir = -l $path ? readlink $path : $path;
my ($root) = $path =~ /(.*\/).*/;
my $full_path = $root . "/$realdir";
my @temp = stat($full_path);
my $modtime = localtime($temp[9]);
return ($realdir,$modtime);
}
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/make_classes.pl view on Meta::CPAN
my $file = "$dir/$base.pm";
die "Couldn't find $file" unless -d $dir;
if (-e $file) {
# if the create script is newer than the .pm file redo the class
my $st_out = stat("$file");
my $st_in = stat("$CREATE");
# otherwise check each class's files
if ($st_in->mtime < $st_out->mtime) {
my @files;
# check the master column2name file
scripts/make_classes.pl view on Meta::CPAN
}
}
# go through the files and see if any are more recent
foreach (@files) {
die "Couldn't find $_" unless -e $_;
$st_in = stat($_);
last if $st_in->mtime > $st_out->mtime;
}
# skip this target if none of the files are more recent
if ($st_in->mtime < $st_out->mtime) {
scripts/make_classes.pl view on Meta::CPAN
my $pod = $base . '.pod';
# we only want to make a new pod file if the infile has been modified
# since we last ran created the pod file
if (-f "$PODROOT/$pod") {
my $st_out = stat("$PODROOT/$pod");
my $st_in = stat("$file");
if ($st_in->mtime < $st_out->mtime) {
print STDERR "Skipping $file (no change)\n" if $DEBUG;
next;
}
scripts/make_classes.pl view on Meta::CPAN
my $html = $base . '.html';
# we only want to make a new html file if the pod file has been changed
# since we last ran created the html file
if (-f "$HTMLROOT/$html") {
my $st_out = stat("$HTMLROOT/$html");
my $st_in = stat("$PODROOT/$pod");
if ($st_in->mtime < $st_out->mtime) {
print STDERR "Skipping $HTMLROOT/$html (no change)\n" if $DEBUG;
next;
}
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/Bio/Gonzales/Domain/Identification/HMMER.pm view on Meta::CPAN
sub _create_cache_string {
my ( $self, $sequence_file, $k ) = @_;
return join "\t",
(
_basename_no_suffix($sequence_file) . "_" . stat($sequence_file)->size,
$k->{seq_id}, $k->{hmm_acc}, $k->{hmm_score}, $k->{from}, $k->{to}
);
}
sub _update_sequence_mark {
lib/Bio/Gonzales/Domain/Identification/HMMER.pm view on Meta::CPAN
sub _get_cached_hits {
my ( $self, $sequence_file ) = @_;
my @best_hits;
my $seq_file_id = _basename_no_suffix($sequence_file) . "_" . stat($sequence_file)->size;
open my $cache, '<', $self->discovered_cache_file
or croak "Can't open filehandle: $!";
while ( my $l = <$cache> ) {
my @rows = split /\t/, $l;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/Graphics/FeatureFile.pm view on Meta::CPAN
$Storable::Eval = 1;
my $file = $has_libs && $args{-file} or return $self->_new(@_);
(my $name = $args{-file}) =~ s!/!_!g;
my $cachefile = $self->cachefile($name);
if (-e $cachefile && (stat(_))[9] >= $self->file_mtime($args{-file})) { # cache is valid
# if (-e $cachefile && -M $cachefile < 0) { # cache is valid
my $parsed_file = lock_retrieve($cachefile);
$parsed_file->initialize_code if $parsed_file->safe;
return $parsed_file;
} else {
lib/Bio/Graphics/FeatureFile.pm view on Meta::CPAN
my $file = shift;
my $mtime = 0;
for my $f (glob($file)) {
my $m = (stat($f))[9] or next;
$mtime = $m if $mtime < $m;
open my $fh,'<',$file or next;
my $cwd = getcwd();
chdir(dirname($file));
lib/Bio/Graphics/FeatureFile.pm view on Meta::CPAN
sub _stat {
my $self = shift;
my $file = shift;
defined fileno($file) or return;
my @stat = stat($file) or return;
if ($self->{stat} && @{$self->{stat}}) { # merge #includes so that mtime etc are max age
for (8,9,10) {
$self->{stat}[$_] = $stat[$_] if $stat[$_] > $self->{stat}[$_];
}
$self->{stat}[7] += $stat[7];
lib/Bio/Graphics/FeatureFile.pm view on Meta::CPAN
}
sub parse_fh {
my $self = shift;
my $fh = shift;
$self->_stat($fh);
local $/ = "\n";
local $_;
while (<$fh>) {
chomp;
$self->parse_line($_) || last;
lib/Bio/Graphics/FeatureFile.pm view on Meta::CPAN
=item $ctime = $features-E<gt>ctime
=item $size = $features-E<gt>size
Returns stat() information about the data file, for featurefile
objects created using the -file option. Size is in bytes. mtime,
atime, and ctime are in seconds since the epoch.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bio/KBase/InvocationService/InvocationServiceImpl.pm view on Meta::CPAN
my @files;
my $dh;
opendir($dh, $dir) or die "Cannot open directory: $!";
while (my $file = readdir($dh)) {
next if ($file =~ m/^\./);
my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat("$dir/$file");
my $date= strftime("%b %d %G %H:%M:%S", localtime($mtime));
if (-f "$dir/$file") {
push @files, { name => $file, full_path => "$fpath/$file", mod_date => $date, size => $size};
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
mcprimers.pl view on Meta::CPAN
sub sanity_check_arguments {
(my $dev,my $ino,my $mode,my $nlink,my $uid,my $gid,my $rdev,my $size,
my $atime,my $mtime,my $ctime,my $blksize,my $blocks)
= stat(*STDIN);
if ($flag{filter} == 0 and $size > 0) {
die "\nError - Input is redirected and -filter flag not set\n\n";
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/21_compressionBenchmark.t view on Meta::CPAN
system("gzip -f $RealBin/simulated.fastq"); # gzip first
system("zcat $RealBin/simulated.fastq.gz | perl -I$RealBin/../lib scripts/sortFastq.pl | gzip -fc > $RealBin/sorted.fastq.gz");
die if $?;
my $simulatedSize = (stat("$RealBin/simulated.fastq.gz"))[7];
my $sortedSize = (stat("$RealBin/sorted.fastq.gz"))[7];
my $reduction = sprintf("%0.2f",$sortedSize/$simulatedSize * 100);
diag "Filesize reduction when sorted: $reduction%";
cmp_ok($simulatedSize, '>', $sortedSize, "File sizes ($simulatedSize > $sortedSize, $reduction%)");
}
view all matches for this distribution
view release on metacpan or search on metacpan
int i;
/* checking for existance of file and its permissions */
if( file_name == NULL ) croak("readScf(...) : file_name is NULL");
file_stat = malloc(sizeof(struct stat));
i = stat(file_name, file_stat);
if( i == -1 ){
switch(errno){
case ENOENT :
croak("get_scf_pointer(...) : file %s doesn't exist\n", file_name);
break;
view all matches for this distribution