Apache-FilteringProxy

 view release on metacpan or  search on metacpan

lib/Apache/FilteringProxy.pm  view on Meta::CPAN

		$r->warn("FilteringProxyResourceDomain not set, defaulting to servername '$local_servername'");
	} else {
		$resource_domain = lc($resource_domain);
		$r->warn("FilteringProxyResourceDomain set to '$resource_domain'");
	}

	### 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];

		# only update our cached configuration if the config file has been modififed
		if (!defined($Apache::FilteringProxy::config_modification) or 
		   ($mtime > $Apache::FilteringProxy::config_modification)) 
		{

lib/Apache/FilteringProxy.pm  view on Meta::CPAN

			$/ = "\n";
			close(CONFIG);

			# create parser object and parse configuration from our string
			my $config = new XML::EasyOBJ(-type => 'string', -param => $xml_source);
			#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");
			} else {
				$r->warn("config: modification time: current=$mtime,last=none");
			}

			$Apache::FilteringProxy::config_modification = $mtime;



( run in 0.544 second using v1.01-cache-2.11-cpan-39bf76dae61 )