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 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 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 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 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 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 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 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 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 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 release on metacpan or search on metacpan
	}
    }
    # better error checking ?
    $filename ||= $r->filename();
    # using _ is optimized to use last stat() record
    return(404) if (! -e $filename or -d _);
    # alias $0 to filename, bind to glob for bug workaround
    local *0 = \$filename;
    my $compile_checksum = $no_compile_checksum ? '' : $self->{compile_checksum};
    my @inode_stat = ();
    if($self->{inode_names}) {
	@inode_stat = stat($file);
	# one or the other device or file ids must be not 0
	unless($inode_stat[0] || $inode_stat[1]) {
	    @inode_stat = ();
	}
    }
	    $self->{dbg} && $self->Debug("no stat: found cached code for include $id");
	    return $compiled;
	}
	
	# return cached code if include hasn't been modified recently
	$mtime = (stat($include))[9];
	if($compiled && ($compiled->{mtime} > $mtime)) {
	    #	$self->Debug("found cached code for include $id");
	    # now check for changed includes, return if not changed
	    my $includes_changed = 0;
	    if(my $includes = $Apache::ASP::Includes{$include}) {
		for my $k (keys %$includes) {
		    my $v = $includes->{$k} || 0;
		    my @stat = stat($k);
		    if(@stat) {
			if($stat[9] >= $v) {
			    $self->{dbg} && $self->Debug("file $k mtime changed from $v to $stat[9]");
			    $includes_changed = 1;
			    last;
  PerlSetVar BufferingOn 1
=item InodeNames
Default 0. Set to 1 to uses a stat() call on scripts and includes to
derive subroutine namespace based on device and inode numbers. In case of 
multiple symbolic links pointing to the same script this will result 
in the script being compiled only once. Use only on unix flavours
which support the stat() call that know about device and inode 
numbers.
  PerlSetVar InodeNames 1
=item RequestParams
this allows your application to be frozen, and only reloaded on the 
next server restart or stop/start.
There are a few advantages for not reloading scripts and modules
in production.  First there is a slight performance improvement
by not having to stat() the script, its includes and the global.asa
every request.  
From an application deployment standpoint, you
also gain the ability to deploy your application as a 
snapshot taken when the server starts and restarts.
 ++ For ANY PerlSetVar type config, OFF/Off/off will be assumed 
    to have value of 0 for that setting.  Before, only a couple settings
    had this semantics, but they all do now for consistency.
 - Fix for InodeNames config on OpenBSD, or any OS that might have
   a device # of 0 for the file being stat()'d, thanks to Peter Galbavy
   for bug report.
 ++ Total XSLT speedups, 5-10% on large XSLT, 10-15% on small XSLT
 + bypass meta data check like expires for XSLT Cache() API use
     is now handled by CompileInclude() which does this functionality already
   + removed unnecessary decomp of IncludesChanged() INTERNAL API, which was along
     critical code path
   + do not call INTERNAL SearchDirs() API when compiling base script
     since we have already validated its path earlier
   + Use stat(_) type shortcut for stat() & -X calls where possible
   + Moved @INC initilization up to handler() & consolidated with $INCDir lib
   + removed useless Apache::ASP::Collection::DESTROY
   + removed useless Apache::ASP::Server::DESTROY
   + removed useless Apache::ASP::GlobalASA::DESTROY
   + removed useless Apache::ASP::Response::DESTROY
  StateDB config, and added Makefile.PL entry.
 +Removed deprecated MD5 use and replace with Digest::MD5 calls
 +PerlSetVar InodeNames 1 config which will compile scripts hashed by 
  their device & inode identifiers, from a stat($file)[0,1] call.
  This allows for script directories, the Global directory,
  and IncludesDir directories to be symlinked to without
  recompiling identical scripts.  Likely only works on Unix
  systems.  Thanks to Ime Smits for this one.
  $Request->* collections/hashes to Tie::IxHash, so that data
  in those collections would be read in the order the 
  browser sent it, when eaching through or with keys.
 -global.asa will be reloaded when changed.  This broke
  when I optimized the modification times with (stat($file))[9]
  rather than "use File::stat; stat($file)->mtime"
 -Make Apache::ASP->Loader() PerlRestartHandler safe,
  had some unstrict code that was doing the wrong thing.
 -IncludesDir config now works with DynamicIncludes.
view release on metacpan or search on metacpan
  # Unless the thumbnail file exists, and
  # is newer than the file it's a thumbnail for, generate the
  # thumbnail
  foreach (@files) {
    unless ( -e "$thumb_dir/$path_info/tn__$_" && 
	     (stat(_))[9] > (stat("$album_dir/$path_info/$_"))[9] ) {
      # Make sure the thumbnail directory exists
      &mymkdir("$thumb_dir/$path_info", 0755) 
	unless -d "$thumb_dir/$path_info";
view release on metacpan or search on metacpan
AliasList.pm view on Meta::CPAN
  
  (my $uri  = $r->uri) =~ s!([^/]+)/+$!$1!;
  
  # Reload the alias.list file if it has been modified since the last reload
  my $aliasfile = $r->dir_config('AliasList') or return DECLINED;
  my $st        = stat($aliasfile);
  if ($st->mtime > $list_mtime) {
    $list_mtime  = $st->mtime;
    @aliaslist   = &load_alias_list($r);
    %forward_map = &generate_forward_map(@aliaslist);
    %reverse_map = &generate_reverse_map(@aliaslist);
view release on metacpan or search on metacpan
	
	$t->{filename} = $r->filename;
	unless (-e $t->{filename} && -r $t->{filename}) {
		return NOT_FOUND;
	}
	my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks)=stat($t->{filename});
	($t->{FileInfo}->{'name'}) = $t->{filename} =~ m!(([^/\\]|\\\/)+)$!;
	$t->{FileInfo}->{'date'} = &getDatestring($mtime, $r->dir_config('Months'));
	$t->{FileInfo}->{'rawsize'} = -s $t->{filename};
	$t->{FileInfo}->{'size'} = &getSizestring($t->{FileInfo}->{'rawsize'});
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 release on metacpan or search on metacpan
AuthExpire.pm view on Meta::CPAN
    $realm =~ s/\//_/g;
    my $host = $r->get_remote_host();
    my $time_file = $r->server_root_relative("conf/times/$realm-$host.$user");
    $log->notice("Time file set to $time_file") if ($DEBUG);
    if (-e $time_file) {   # if timestamp file exists, check time difference
        my $last_time = (stat($time_file))[9] 
            || $log->warn("Unable to get last modtime from file: $!");
        my $time_delta = ($current_time - $last_time); # Determine time since last access
        if ($time_to_die >  $time_delta) {
        	# time delta = specified time limit
view release on metacpan or search on metacpan
lib/Apache/AuthzUnix.pm view on Meta::CPAN
#  If we're PUTting a file, we want to check if we can write to the directory.
#  Otherwise, we're GETting a non-existent or autogenerated file (ie autoindex)
#     If it's a directory index, then we use the permissions of the directory.
#     If it's non-existent, permissions are an irrelevance!
    my $stat       = File::stat::stat($fn);
    my $access     =
      _access($user, $stat->mode, $stat->uid, $stat->gid, $r->method);
    warn "Access to file: "
      . $r->filename
      . " (resolved as $fn) : "
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 release on metacpan or search on metacpan
lib/Apache/AxKit/Provider/RDBMS/DBCacheAdapter/SQLite.pm view on Meta::CPAN
    my $this = shift;
    
    my $DBIString = $this->{apache}->dir_config("DBIString");
    $DBIString =~ /=(.+)$/;
    
    return (stat($1))[9];
}
1;
view release on metacpan or search on metacpan
configuration/dbconf/globalconf.pl view on Meta::CPAN
#FORCE_UPPERCASE_ON_ATTRIBUTES
# When ENABLE_STATISTICS_ON_DO is set to 1, a DBI::BabyConnect object maintains
# a table to hold statistics about the do()'s requested by identifying each entry
# with the query string being passed to the do() method. The programmer can
# then call get_do_stat() to get the object that hold the statistics.
# Do not enable this unless you need to collect statistics, for instance in
# data warehousing environment the queries to do() are limited in format
# and are time consuming, so you may desire to collect statistics about these
# do()'s queries.
# 
ENABLE_STATISTICS_ON_DO=0
# When ENABLE_STATISTICS_ON_SPC is set to 1, a DBI::BabyConnect object maintains
# a table to hold statistics about the spc()'s requested by identifying each entry
# with the stored procedure name passed to the spc() method. The programmer can
# then call get_spc_stat() to get the object that hold the statistics.
# Do not enable this unless you need to collect statistics, for instance in
# data warehousing environment the stored procedure names passed spc() are limited in number
# and are time consuming, so you may desire to collect statistics about these
# spc()'s stored procedures.
ENABLE_STATISTICS_ON_SPC=0
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 release on metacpan or search on metacpan
lib/Apache/Config/Preproc/include.pm view on Meta::CPAN
    return $self->{server_root};
}
sub context_string {
    my ($self, $file) = @_;
    my ($dev,$ino) = stat($file);
    $file = abs_path($file);
    return "\"$file\" $dev $ino";
}
sub context_push {
lib/Apache/Config/Preproc/include.pm view on Meta::CPAN
}
# Default included file table for unix-like OSes
sub _check_included_stat {
    my ($self, $file) = @_;
    my ($dev,$ino) = stat($file) or return 0;
    return grep { $_->{dev} == $dev && $_->{ino} == $ino } @{$self->{context}};
}
# Path-based file table, for defective OSes (MSWin32)
sub _check_included_path {
view release on metacpan or search on metacpan
lib/Apache/ConfigParser.pm view on Meta::CPAN
  } else {
    @paths = ($path);
  }
  foreach my $p (@paths) {
    my @stat = stat($p);
    unless (@stat) {
      $self->{errstr} = "'$file_or_dir_name' line $line_number " .
                        "'$directive $path': stat of '$path' failed: $!";
      # Check if missing file or directory errors should be ignored.
      # This checks an undocumented object variable which is normally
lib/Apache/ConfigParser.pm view on Meta::CPAN
    confess "$0: Apache::ConfigParser::parse_file $INCORRECT_NUMBER_OF_ARGS";
  }
  my ($self, $file_or_dir_name) = @_;
  my @stat = stat($file_or_dir_name);
  unless (@stat) {
    $self->{errstr} = "cannot stat '$file_or_dir_name': $!";
    return;
  }
view release on metacpan or search on metacpan
lib/Apache/DnsZone.pm view on Meta::CPAN
	output_redirect($r, 1, '/admin');
	$dbh->close();
	return REDIRECT;
    }
    # is uid owner of dom_id
    my ($domain, $domain_owner_id) = $dbh->domain_stat($dom_id);
    unless (defined($domain_owner_id) && $uid == $domain_owner_id) {
	$r->log_reason("User trying to hijack another domain");
	output_redirect($r, 1, '/admin');
	$dbh->close();
	return REDIRECT;
lib/Apache/DnsZone.pm view on Meta::CPAN
	output_redirect($r, 1, '/admin');
	$dbh->close();
	return REDIRECT;
    }
    # is uid owner of dom_id
    my ($domain, $domain_owner_id) = $dbh->domain_stat($dom_id);
    unless (defined($domain_owner_id) && $uid == $domain_owner_id) {
	$r->log_reason("User trying to hijack another domain");
	output_redirect($r, 1, '/admin');
	$dbh->close();
	return REDIRECT;
lib/Apache/DnsZone.pm view on Meta::CPAN
	output_redirect($r, 1, '/admin');
	$dbh->close();
	return REDIRECT;
    }
    # is uid owner of dom_id
    my ($domain, $domain_owner_id) = $dbh->domain_stat($dom_id);
    unless (defined($domain_owner_id) && $uid == $domain_owner_id) {
	$r->log_reason("User trying to hijack another domain");
	output_redirect($r, 1, '/admin');
	$dbh->close();
	return REDIRECT;
lib/Apache/DnsZone.pm view on Meta::CPAN
	output_redirect($r, 1, '/admin');
	$dbh->close();
	return REDIRECT;
    }
    # is uid owner of dom_id
    my ($domain, $domain_owner_id) = $dbh->domain_stat($dom_id);
    unless (defined($domain_owner_id) && $uid == $domain_owner_id) {
	$r->log_reason("User trying to hijack another domain");
	output_redirect($r, 1, '/admin');
	$dbh->close();
	return REDIRECT;
view release on metacpan or search on metacpan
  # First time through, this creates an anonymous hash.
  # On subsequent runs, the hash is cleared if $dirname's
  # mtime has changed. This is how you get Apache::EnvDir
  # to notice that files have gone away.
  $dircfg->{mtime} ||= 0;
  %$dircfg = () if (stat(_))[9] > $dircfg->{mtime};
  $prefix ||= "";
  $dircfg->{prefix} = $prefix;
  $dircfg->{mtime} = (stat(_))[9];
  local *DIR;
  opendir(DIR, $dirname) || die "couldn't open $dirname\n";
  local *FILE;
    # Only do files.
    next unless (-f $path && -r _);
    # Skip files that havn't changed.
    $dircfg->{file}{$file} ||= [0,""];
    next unless (stat(_))[9] > $dircfg->{file}{$file}[0];
    $changeflag++;
    $dircfg->{file}{$file}[0] = (stat(_))[9];
    if(open FILE, $path) {
      $dircfg->{file}{$file}[1] = <FILE>;
      $dircfg->{file}{$file}[1] =~ s/[\r\n]$//g;
      close(FILE);
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 release on metacpan or search on metacpan
lib/Apache/FilteringProxy.pm view on Meta::CPAN
	### XML CONFIGURATION
	# get the modification time of the configuration file
	# dev,ino,mode,nlink,uid,gid,rdev,size,atime,mtime,ctime,blksize,blocks
	my @stat;
	unless ((-r $config_file) and (@stat = stat($config_file))) {
		$r->warn("could not stat '$config_file' ( FilteringProxyConfig )");
	} else {
		$r->warn("DEBUG: entering XML configuration");
		my $mtime = $stat[9];
lib/Apache/FilteringProxy.pm view on Meta::CPAN
			#my $config = my $doc = new XML::EasyOBJ(-type => 'file', -param => $config_file);
			# we have just modified our file, so let's set our modification
			# date to the new mod time so we don't keep causing ourself to
			# reread the config
			@stat = stat($config_file);
			$mtime = $stat[9];
			# log the configuration file modification stats 
			if (defined($Apache::FilteringProxy::config_modification)) {
				$r->warn("config: modification time: current=$mtime,last=$Apache::FilteringProxy::config_modification");
view release on metacpan or search on metacpan
lib/Apache/Gallery.pm view on Meta::CPAN
		my $subr = $r->lookup_file($file);
		$r->content_type($subr->content_type());
		if ($::MP2) {
			my $fileinfo = stat($file);
			my $nonce = md5_base64($fileinfo->ino.$fileinfo->mtime);
			if ($r->headers_in->{"If-None-Match"} eq $nonce) {
				return Apache2::Const::HTTP_NOT_MODIFIED();
			}
lib/Apache/Gallery.pm view on Meta::CPAN
			$dirsortby=$r->dir_config('GalleryDirSortBy');
		} else {
			$dirsortby=$r->dir_config('GallerySortBy');
		}
		if ($dirsortby && $dirsortby =~ m/^(size|atime|mtime|ctime)$/) {
			@directories = map(/^\d+ (.*)/, sort map(stat("$filename/$_")->$dirsortby()." $_", @directories));
		} else {
			@directories = sort @directories;
		}
		closedir(DIR);
lib/Apache/Gallery.pm view on Meta::CPAN
				}
				# Debian bug #619625 <http://bugs.debian.org/619625>
				elsif (-f $thumbfilename && $thumbfilename =~ /$doc_pattern/i && $thumbfilename !~ /$img_pattern/i && ! -e $thumbfilename . ".ignore") {
					my $type = lc($1);
					my $stat = stat($thumbfilename);
					my $size = $stat->size;
					my $filetype;
					if ($thumbfilename =~ m/\.(mpe?g|avi|mov|asf|wmv)$/i) {
						$filetype = "video-$type";
lib/Apache/Gallery.pm view on Meta::CPAN
				$dirsortby=$r->dir_config('GalleryDirSortBy');
			} else {
				$dirsortby=$r->dir_config('GallerySortBy');
			}
			if ($dirsortby && $dirsortby =~ m/^(size|atime|mtime|ctime)$/) {
				@neighbour_directories = map(/^\d+ (.*)/, sort map(stat("$parent_filename/$_")->$dirsortby()." $_", @neighbour_directories));
			} else {
				@neighbour_directories = sort @neighbour_directories;
			}
			closedir(PARENT_DIR);
lib/Apache/Gallery.pm view on Meta::CPAN
	if (-f $cache."/".$newfilename) {	
		$scale = 0;
		# Check to see if the image has changed
		my $filestat = stat($fullpath);
		my $cachestat = stat($cache."/".$newfilename);
		if ($filestat->mtime >= $cachestat->mtime) {
			$scale = 1;
		}	
		# Check to see if the .rotate file has been added or changed
		if (-f $fullpath . ".rotate") {
			my $rotatestat = stat($fullpath . ".rotate");
			if ($rotatestat->mtime > $cachestat->mtime) {
				$scale = 1;
			}	
		}		
		# Check to see if the copyrightimage has been added or changed
		if ($r->dir_config('GalleryCopyrightImage') && -f $r->dir_config('GalleryCopyrightImage')) {
			unless ($width == $thumbnailwidth or $width == $thumbnailheight) {
				my $copyrightstat = stat($r->dir_config('GalleryCopyrightImage'));
				if ($copyrightstat->mtime > $cachestat->mtime) {
					$scale = 1;
				}	
			}
		}	
lib/Apache/Gallery.pm view on Meta::CPAN
	if ($r->dir_config('GalleryUseFileDate') &&
		($r->dir_config('GalleryUseFileDate') eq '1'
		|| !$imageinfo->{"Picture Taken"} )) {
		my $st = stat($file);
		$imageinfo->{"DateTimeOriginal"} = $imageinfo->{"Picture Taken"} = scalar localtime($st->mtime) if $st;
	}
	return $imageinfo;
}
lib/Apache/Gallery.pm view on Meta::CPAN
	my @files=@_;
	my $sortby = $r->dir_config('GallerySortBy');
	my $filename=$r->lookup_uri($r->uri)->filename;
	$filename=(File::Spec->splitpath($filename))[1] if (-f $filename);
	if ($sortby && $sortby =~ m/^(size|atime|mtime|ctime)$/) {
		@files = map(/^\d+ (.*)/, sort map(stat("$filename/$_")->$sortby()." $_", @files));
	} else {
		@files = sort @files;
	}
	return @files;
}
view release on metacpan or search on metacpan
else { print "not ok\n"; }
if(-e 'htaccess') { print "ok 7\n"; }
else { print "not ok\n"; }
if( (stat('htaccess'))[7] > 0 ) { print "ok 8\n"; }
else { print "not ok\n"; }
view release on metacpan or search on metacpan
lib/Apache/Imager/Resize.pm view on Meta::CPAN
		
		$shrunk .= $suffix;
		
		if (file_ok( $shrunk, $filename )) {
			$r->filename($shrunk);
			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