view release on metacpan or search on metacpan
lib/Apache2/AuthenNTLM/Cookie.pm view on Meta::CPAN
PerlSetVar cookie_name my_cookie_name # default is NTLM_AUTHEN
PerlSetVar domain my_cookie_domain # default is none
PerlSetVar expires my_cookie_expires # default is none
PerlSetVar path my_cookie_path # default is none
PerlSetVar refresh some_seconds # default is 14400 (4 hours)
PerlSetVar secret my_secret_string # default from stat(config file)
See L<Apache2::Cookie> for explanation of variables
C<cookie_name>, C<domain>, C<expires>, and C<path>.
The only variables specific to the present module are
view all matches for this distribution
view release on metacpan or search on metacpan
examples/sitemap.pl view on Meta::CPAN
chdir('/home/nicolaw/webroot/www/bb-207-42-158-85.fallbr.tfb.net/') || die $!;
my $map = WWW::Google::SiteMap->new(file => 'sitemap.gz');
File::Find::find({wanted => sub {
my ($dev,$ino,$mode,$nlink,$uid,$gid,$mtime,$vol);
(($dev,$ino,$mode,$nlink,$uid,$gid,undef,undef,undef,$mtime) = lstat($_)) &&
-d _ &&
s/^\.\/// &&
!/\/\./s &&
($vol = substr($_,0,1)) &&
print("$_\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
lib/Apache/Dispatch.pm view on Meta::CPAN
#---------------------------------------------------------------------
# reload the module if DispatchStat On or ISA
#---------------------------------------------------------------------
if ($stat eq "ON") {
$rc = __PACKGE__->_stat($class, $log, $debug);
unless ($rc) {
$log->error("\tDispatchStat did not return successfully!");
$log->debug("Exiting Apache::Dispatch") if $debug;
return DECLINED;
}
}
elsif ($stat eq "ISA") {
$rc = __PACKAGE__->_recurse_stat($class, $log, $debug);
unless ($rc) {
$log->error("\tDispatchStat did not return successfully!");
$log->debug("Exiting Apache::Dispatch") if $debug;
return DECLINED;
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
FileManager.pm view on Meta::CPAN
#must be a file
elsif (-f $file) {
#get file size
my $stat = stat($file);
$size = $stat->size;
if ($size > 1024000) {
$size = sprintf("%0.2f",$size/1024000) . " <I>M</I>";
} elsif ($stat->size > 1024) {
$size = sprintf("%0.2f",$size/1024). " <I>K</I>";
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/Apache2/Imager/Resize.pm view on Meta::CPAN
$shrunk .= $suffix;
if (file_ok( $shrunk, $filename )) {
$r->filename($shrunk);
$r->finfo(APR::Finfo::stat($shrunk, APR::Const::FINFO_NORM, $r->pool));
my $mtime = (stat( $shrunk ))[9];
utime time, $mtime, $shrunk;
return OK;
}
# if we're using a separate cache directory, the necessary subdirectory might not exist yet
lib/Apache2/Imager/Resize.pm view on Meta::CPAN
file => $shrunk,
jpegquality => $quality,
) or return fail("Cannot write $shrunk: " . $im->errstr);
$r->filename($shrunk);
$r->finfo(APR::Finfo::stat($shrunk, APR::Const::FINFO_NORM, $r->pool));
return OK;
}
}
sub resize {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/Layer.pm view on Meta::CPAN
$uri
)
);
if ( my $finfo = eval {
APR::Finfo::stat($file, APR::Const::FINFO_NORM, $r->pool)
} ) {
$r->push_handlers(PerlMapToStorageHandler => sub {
my $r = shift;
$r->filename($file);
$r->finfo($finfo);
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/Apache2/PageKit.pm view on Meta::CPAN
sub _send_static_file {
my ( $pk, $filename ) = @_;
my $apr = $pk->{apr};
my $file_mtime = (stat($filename))[9];
my $ims = $apr->headers_in->{'If-Modified-Since'};
if ( $ims ) {
my $t = APR::Date::parse_http($ims);
if ( $t && $file_mtime <= $t ) {
return HTTP_NOT_MODIFIED;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/PodBrowser.pm view on Meta::CPAN
}
sub update_finfo {
my ($r, $name)=@_;
$r->finfo(APR::Finfo::stat($name, APR::Const::FINFO_NORM,
$r->pool)) if defined $name;
$r->set_last_modified($r->finfo->mtime);
$r->set_etag;
my $rc=$r->meets_conditions;
lib/Apache2/PodBrowser.pm view on Meta::CPAN
$r->content_encoding('gzip');
$r->filename($css.'.gz');
$r->path_info('');
$r->handler('default');
$r->content_type('text/css');
$r->finfo(APR::Finfo::stat($r->filename, APR::Const::FINFO_NORM,
$r->pool));
return Apache2::Const::OK;
}
}
if (-f $css) {
$r->filename($css);
$r->path_info('');
$r->handler('default');
$r->content_type('text/css');
$r->finfo(APR::Finfo::stat($r->filename, APR::Const::FINFO_NORM,
$r->pool));
return Apache2::Const::OK;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/Response/FileMerge.pm view on Meta::CPAN
$file_name = "${location}${file_name}" if ( $location );
$file_name = "$root/$file_name.$type";
my $cname = $file_name;
$cname =~ s/\///g;
my $this_mtime = ( stat($file_name) )[9];
$mtime ||= 0;
$mtime = $this_mtime if ( ! $mtime || $mtime > ( $this_mtime || 0 ) );
my $content = '';
if ( exists( $loaded{$cname} ) ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/SSI.pm view on Meta::CPAN
}
sub _lastmod ...
{
my( $self, $file, $format ) = @_;
return( $self->_format_time( ( stat( "$file" ) )[9], $format ) );
}
# This is different from the env() method. This one is obviously private
# whereas the env() one has triggers that could otherwise create an infinite loop.
sub _set_env
view all matches for this distribution
view release on metacpan or search on metacpan
ScoreBoardFile.xs view on Meta::CPAN
init(int fd, Apache2__ScoreBoardFile *result) {
void *map;
struct stat statbuf;
*result=NULL;
if(fstat(fd, &statbuf)) return -1;
map=mmap(NULL, statbuf.st_size, PROT_READ, MAP_SHARED, fd, 0);
if( map==MAP_FAILED ) return -1;
*result=map;
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/Apophis.xs view on Meta::CPAN
HV *meta;
apophis_stat_t st;
char *buf, *p, *end;
SSize_t nread;
if (stat(meta_path, &st) != 0) return NULL;
fh = PerlIO_open(meta_path, "r");
if (!fh) return NULL;
buf = (char *)malloc((size_t)st.st_size + 1);
lib/Apophis.xs view on Meta::CPAN
*
* Fuses the entire store pipeline into a single op:
* 1. Extract namespace bytes from object
* 2. SHA-1 hash content â UUID v5
* 3. Compute 2-level sharded path
* 4. stat() for CAS dedup check
* 5. mkdir -p parent directories
* 6. Atomic write (temp + rename)
* 7. Format and return UUID string
*/
static OP *
lib/Apophis.xs view on Meta::CPAN
apophis_build_path(path, sizeof(path),
store_dir, store_dir_len,
id_str, HORUS_FMT_STR_LEN);
/* CAS dedup: only write if not already stored */
if (stat(path, &st) != 0) {
apophis_ensure_parent_dir(path);
apophis_atomic_write(aTHX_ path, content, content_len);
}
EXTEND(SP, 1);
lib/Apophis.xs view on Meta::CPAN
* pp_apophis_exists - Custom op: UUID â boolean existence check
*
* Stack input: self_sv, id_sv
* Stack output: bool_sv
*
* Fuses: path computation + stat() into a single op.
*/
static OP *
pp_apophis_exists(pTHX) {
dSP;
SV *id_sv = POPs;
lib/Apophis.xs view on Meta::CPAN
apophis_build_path(path, sizeof(path),
store_dir, store_dir_len, id_str, id_len);
EXTEND(SP, 1);
PUSHs(stat(path, &st) == 0 ? &PL_sv_yes : &PL_sv_no);
PUTBACK;
return NORMAL;
}
/*
lib/Apophis.xs view on Meta::CPAN
apophis_build_path(path, sizeof(path),
store_dir, store_dir_len, id_str, id_len);
EXTEND(SP, 1);
if (stat(path, &st) != 0) {
PUSHs(&PL_sv_undef);
} else {
PerlIO *fh = PerlIO_open(path, "rb");
if (!fh)
croak("Apophis: pp_fetch: cannot open '%s': %s",
lib/Apophis.xs view on Meta::CPAN
path_len = apophis_build_path(path, sizeof(path),
store_dir, store_dir_len,
id_str, HORUS_FMT_STR_LEN);
/* CAS dedup: skip if already exists */
if (stat(path, &st) != 0) {
apophis_ensure_parent_dir(path);
apophis_atomic_write(aTHX_ path, content, content_len);
}
/* Write metadata sidecar if provided */
lib/Apophis.xs view on Meta::CPAN
id_str = SvPV(id, id_len);
apophis_build_path(path, sizeof(path),
store_dir, store_dir_len, id_str, id_len);
/* Check existence */
if (stat(path, &st) != 0) {
RETVAL = &PL_sv_undef;
} else {
/* Read entire file */
fh = PerlIO_open(path, "rb");
if (!fh)
lib/Apophis.xs view on Meta::CPAN
store_dir = apophis_get_store_dir(aTHX_ hv, opts, &store_dir_len);
id_str = SvPV(id, id_len);
apophis_build_path(path, sizeof(path),
store_dir, store_dir_len, id_str, id_len);
RETVAL = (stat(path, &st) == 0) ? TRUE : FALSE;
OUTPUT:
RETVAL
# ------------------------------------------------------------------ #
# remove($id, %opts) -> bool #
lib/Apophis.xs view on Meta::CPAN
apophis_build_path(path, sizeof(path),
store_dir, store_dir_len,
id_str, HORUS_FMT_STR_LEN);
if (stat(path, &st) != 0) {
apophis_ensure_parent_dir(path);
apophis_atomic_write(aTHX_ path, content, content_len);
}
PUSHs(sv_2mortal(newSVpvn(id_str, HORUS_FMT_STR_LEN)));
lib/Apophis.xs view on Meta::CPAN
id_str = SvPV(*svp, id_len);
apophis_build_path(path, sizeof(path),
store_dir, store_dir_len, id_str, id_len);
if (stat(path, &st) != 0) {
XPUSHs(sv_2mortal(newSVpvn(id_str, id_len)));
}
}
# ------------------------------------------------------------------ #
lib/Apophis.xs view on Meta::CPAN
store_dir = apophis_get_store_dir(aTHX_ hv, NULL, &store_dir_len);
apophis_build_path(path, sizeof(path),
store_dir, store_dir_len,
id_str, HORUS_FMT_STR_LEN);
if (stat(path, &st) != 0) {
apophis_ensure_parent_dir(path);
apophis_atomic_write(aTHX_ path, content, content_len);
}
RETVAL = newSVpvn(id_str, HORUS_FMT_STR_LEN);
lib/Apophis.xs view on Meta::CPAN
store_dir = apophis_get_store_dir(aTHX_ hv, NULL, &store_dir_len);
id_str = SvPV(id, id_len);
apophis_build_path(path, sizeof(path),
store_dir, store_dir_len, id_str, id_len);
RETVAL = (stat(path, &st) == 0) ? TRUE : FALSE;
OUTPUT:
RETVAL
# op_fetch($self, $id) -> \$content or undef
# Fused path computation + stat + read â single call.
lib/Apophis.xs view on Meta::CPAN
store_dir = apophis_get_store_dir(aTHX_ hv, NULL, &store_dir_len);
id_str = SvPV(id, id_len);
apophis_build_path(path, sizeof(path),
store_dir, store_dir_len, id_str, id_len);
if (stat(path, &st) != 0) {
RETVAL = &PL_sv_undef;
} else {
fh = PerlIO_open(path, "rb");
if (!fh)
croak("Apophis::op_fetch: cannot open '%s': %s",
view all matches for this distribution
view release on metacpan or search on metacpan
script/_acme-cpanauthors 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
lib/App/AutoBuild.pm view on Meta::CPAN
2 shows debugging for job numbers (not useful really yet)
-d: increase debugosity (-dd or more -d's)
0 (default) nothing!
1 show which dependencies caused a recompile
2 show stat() calls
-q: be more quiet
--cc=(compiler path): pick a compiler other than gcc
lib/App/AutoBuild.pm view on Meta::CPAN
=head1 DESCRIPTION
After writing a makefile for my 30th C project, I decided this was dumb and it (the computer) should figure out which object files should be linked in or recompiled. The idea behind this module is you create a build.pl that uses App::AutoBuild and c...
App::AutoBuild will figure out all the object files your C file depends on. A list of included header files (.h) will be computed by GCC and remembered in a cache. At build time, stat() is called on each header file included by your .c file. If an...
This tool isn't supposed to be a make replacement-- there are plenty of those, and at least one great one already in Perl. The idea is that the build system should know enough about the source code to do what you want for you. This replaces all the...
=head1 CAVEATS
lib/App/AutoBuild.pm view on Meta::CPAN
2 shows debugging for job numbers (not useful really yet)
-d: increase debugosity (-dd or more -d's)
0 (default) nothing!
1 show which dependencies caused a recompile
2 show stat() calls
clean: unlink output files/meta file ($meta_file)
zap
exit(1);
}
lib/App/AutoBuild.pm view on Meta::CPAN
{
return $self->{'mtime_this_run'}{$file};
}
if($self->{'debug'} > 1)
{
print "stat('$file');\n";
}
my @s = stat($file);
$self->{'mtime_this_run'}{$file} = $s[9];
return $s[9];
}
sub md5
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/BCVI/NotifyClient.pm view on Meta::CPAN
sub _notify_tty_mtime {
my($self, $opt) = @_;
my @stat = stat($opt->{tty}) or die "stat($opt->{tty}): $!";
return $stat[9];
}
sub _notify_current_tty {
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/Basis/ConvertText2.pm view on Meta::CPAN
# then we need to convert it again
if ( $format !~ /html/i ) {
# as we can generate PDF using a number of convertors we should
# always regenerate PDF output incase the convertor used is different
if ( !-f $outfile || $format =~ /pdf/i || ( ( stat($cf) )[9] > ( stat($outfile) )[9] ) ) {
$outfile = $self->_convert_file( $cf, $format, $pdfconvertor );
# if we failed to convert, then clear the filename
if ( !$outfile || !-f $outfile ) {
$outfile = 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
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/BookmarkFeed.pm view on Meta::CPAN
$sql->migrations->from_data->migrate;
my $db = $sql->db;
for (@files) { die "$_ is not readable\n" unless -r $_ }
my @items;
for my $file (@files) {
my $dt = DateTime->from_epoch(epoch => (stat($file))[9]);
my $md = read_text($file);
my $parser = CommonMark::Parser->new;
$parser->feed($md);
my $doc = $parser->finish;
push(@items, to_items($doc, $dt));
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