view release on metacpan or search on metacpan
lib/ChordPro/Delegate/ABC.pm view on Meta::CPAN
print => sub { push( @lines, split(/\n/, $_) ) for @_ },
printErr => sub { print STDERR @_ },
quit => sub { exit 66 },
readFile => sub { slurp($_[0]) },
get_mtime => sub {
my @stat = stat($_[0]);
return @stat ? 1000*$stat[9] : undef;
},
loadjs => sub {
my ( $fn, $relay, $onerror ) = @_;
if ( fs_test( sr => "$base/$fn" ) ) {
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
public/javascripts/ace/mode-php.js view on Meta::CPAN
"fsockopen": [
"resource fsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])",
"Open Internet or Unix domain socket connection"
],
"fstat": [
"array fstat(resource fp)",
"Stat() on a filehandle"
],
"ftell": [
"int ftell(resource fp)",
"Get file pointer's read/write position"
public/javascripts/ace/mode-php.js view on Meta::CPAN
"long2ip": [
"string long2ip(int proper_address)",
"Converts an (IPv4) Internet network address into a string in Internet standard dotted format"
],
"lstat": [
"array lstat(string filename)",
"Give information about a file or symbolic link"
],
"ltrim": [
"string ltrim(string str [, string character_mask])",
"Strips whitespace from the beginning of a string"
public/javascripts/ace/mode-php.js view on Meta::CPAN
"mysql_set_charset": [
"bool mysql_set_charset(string csname [, int link_identifier])",
"sets client character set"
],
"mysql_stat": [
"string mysql_stat([int link_identifier])",
"Returns a string containing status information"
],
"mysql_thread_id": [
"int mysql_thread_id([int link_identifier])",
"Returns the thread id of current connection"
public/javascripts/ace/mode-php.js view on Meta::CPAN
"mysqli_ssl_set": [
"bool mysqli_ssl_set(object link ,string key ,string cert ,string ca ,string capath ,string cipher])",
""
],
"mysqli_stat": [
"mixed mysqli_stat(object link)",
"Get current system status"
],
"mysqli_stmt_affected_rows": [
"mixed mysqli_stmt_affected_rows(object stmt)",
"Return the number of rows affected in the last query for the given link"
public/javascripts/ace/mode-php.js view on Meta::CPAN
"sscanf": [
"mixed sscanf(string str, string format [, string ...])",
"Implements an ANSI C compatible sscanf"
],
"stat": [
"array stat(string filename)",
"Give information about a file"
],
"str_getcsv": [
"array str_getcsv(string input[, string delimiter[, string enclosure[, string escape]]])",
"Parse a CSV string into an array"
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/Netdisco/AnyEvent/Nbtstat.pm view on Meta::CPAN
my $request = App::Netdisco::AnyEvent::Nbtstat->new();
my $cv = AE::cv;
$request->nbtstat(
'127.0.0.1',
sub {
my $result = shift;
print "MAC: ", $result->{'mac_address'} || '', " ";
print "Status: ", $result->{'status'}, "\n";
lib/App/Netdisco/AnyEvent/Nbtstat.pm view on Meta::CPAN
L<App::Netdisco::AnyEvent::Nbtstat> implements the following methods.
=head2 C<nbtstat>
$request->nbtstat($ip, sub {
my $result = shift;
});
Perform a NetBIOS node status request of $ip.
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
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
lib/App/Nrepo/Plugin/Base.pm view on Meta::CPAN
sub _validate_file_size {
my $self = shift;
my $file = shift;
my $size = shift;
my @stats = stat($file);
my $file_size = $stats[7];
return $file_size eq $size ? 1 : undef;
}
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/Options.pm view on Meta::CPAN
$secure = 1; # say it is without really checking
}
else {
$secure = $path_is_secure{$file};
if (!defined $secure) {
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($file);
if (!($mode & 0400)) {
$secure = 0;
print "Error: Option file is not secure because it is not readable by the owner.\n";
}
elsif ($mode & 0077) {
lib/App/Options.pm view on Meta::CPAN
else {
$dir =~ s!/?[^/]+$!!;
while ($dir && $secure) {
$secure = $path_is_secure{$file};
if (!defined $secure) {
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat("$dir/."); # navigate symlink to the directory
if ($uid >= 100 && $uid != $>) {
$secure = 0;
print "Error: Option file is not secure because a parent directory is owned by a different user.\n";
print " Dir=[$dir]\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
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
lib/App/Pfind.pm view on Meta::CPAN
# Perform a real-stat or just reads the result from the previous stat. Returns
# just the mode part of the stat.
my $last_stated_file = '';
sub cheap_stat {
my ($relative_file_name, $full_file_name) = @_;
return (stat(_))[2] if $full_file_name eq $last_stated_file;
$last_stated_file = $full_file_name;
# When executing find in follow mode, the current file has already been
# stat-ed (this is guaranteed by find), so we can re-use the value using `_`.
return (stat(_))[2] if $options{follow} || $options{follow_fast};
return (stat($relative_file_name))[2];
}
my %file_mode = (
f => S_IFREG, # regular file
d => S_IFDIR, # directory
lib/App/Pfind.pm view on Meta::CPAN
);
sub should_skip_file {
my ($relative_file_name, $full_file_name) = @_;
return 0 unless %{$options{type}};
my $mode = cheap_stat($relative_file_name, $full_file_name);
for my $m (keys(%{$options{type}})) {
if (($mode & $file_mode{$m}) xor $options{type}{$m}) {
print STDERR "Skipping '$full_file_name' due to '$m' type" if $options{verbose};
return 1;
}
lib/App/Pfind.pm view on Meta::CPAN
bydepth => $options{depth_first},
follow => $options{follow},
follow_fast => $options{follow_fast},
no_chdir => !$options{chdir},
wanted => sub {
if (not $options{recurse} and cheap_stat($_, $File::Find::name) & S_IFDIR) {
print "Will not recurse into $File::Find::name" if $options{verbose};
$File::Find::prune = 1;
}
print STDERR "Looking at file: $File::Find::name" if $options{verbose};
return if should_skip_file($_, $File::Find::name);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Phoebe.pm view on Meta::CPAN
my ($sec, $min, $hour, $mday, $mon, $year) = gmtime(shift);
return sprintf('%02d:%02d UTC', $hour, $min);
}
sub modified {
my $ts = (stat(shift))[9];
return $ts;
}
sub serve_history {
my $stream = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
script/_pick 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] };
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
t/cpan/Mojo2/File.pm view on Meta::CPAN
return Mojo::Collection->new( map { $self->new( canonpath $_) }
sort keys %all );
}
sub lstat { File::stat::lstat( ${ shift() } ) }
sub make_path {
my $self = shift;
File::Path::make_path $$self, @_;
return $self;
t/cpan/Mojo2/File.pm view on Meta::CPAN
( $file->syswrite( $content ) // -1 ) == length $content
or croak qq{Can't write to file "$$self": $!};
return $self;
}
sub stat { File::stat::stat( ${ shift() } ) }
sub tap { shift->Mojo::Base::tap( @_ ) }
sub tempdir { __PACKAGE__->new( File::Temp->newdir( @_ ) ) }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Pods2Site/Pod2HTML.pm view on Meta::CPAN
my $relOutFile = "pod2html/$outfile.html";
$outfile = slashify($args->getSiteDir() . "/$relOutFile");
$workGroup->{podinfo}->{$podName}->{htmlfile} = $outfile;
my $mtimePodfile = (stat($podfile))[9];
my $mtimeOutfile = (stat($outfile))[9] || 0;
if (!-e $outfile || $mtimePodfile > $mtimeOutfile)
{
my $outfileDir = dirname($outfile);
(!-d $outfileDir ? make_path($outfileDir) : 1) || die ("Failed to create directory '$outfileDir': $!\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
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