perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: cvs commit: modperl ToDo
Date Fri, 01 Sep 2000 22:24:19 GMT
On Fri, 1 Sep 2000, Doug MacEachern wrote:

> On Fri, 1 Sep 2000, Stas Bekman wrote:
> 
> > >    - should Apache::Registry use -M or (stat _)[9]?
> > 
> > Doug, what about this thing? Did I miss a patch? In the guide I warn users
> > to do $^T = time, if they want to use -M and get the functionality of
> > (stat _)[9]. Is it different now?
> 
> i haven't changed anything.  i was thinking of the patch below, i don't
> see how it can break anything, i'll commit this unless there's a known
> issue.

Ouch, I wonder how was it running before? Since -M reports the time
relative to the start of the script...

perldoc -f -M
   -M  Age of file in days when script started.

Unless I miss something as usual, your patch is actually fixing a
bug?

> Index: lib/Apache/PerlRun.pm
> ===================================================================
> RCS file: /home/cvs/modperl/lib/Apache/PerlRun.pm,v
> retrieving revision 1.29
> diff -u -r1.29 PerlRun.pm
> --- lib/Apache/PerlRun.pm	2000/06/01 21:07:56	1.29
> +++ lib/Apache/PerlRun.pm	2000/09/01 20:33:16
> @@ -57,7 +57,7 @@
>  	    return FORBIDDEN;
>  	}
>  
> -	$pr->{'mtime'} = -M _;
> +	$pr->{'mtime'} = (stat _)[9];
>  	return wantarray ? (OK, $pr->{'mtime'}) : OK;
>      }
>      return NOT_FOUND;
> Index: lib/Apache/Registry.pm
> ===================================================================
> RCS file: /home/cvs/modperl/lib/Apache/Registry.pm,v
> retrieving revision 1.32
> diff -u -r1.32 Registry.pm
> --- lib/Apache/Registry.pm	2000/08/02 15:53:15	1.32
> +++ lib/Apache/Registry.pm	2000/09/01 20:33:16
> @@ -55,7 +55,7 @@
>  	    return FORBIDDEN;
>  	}
>  
> -	my $mtime = -M _;
> +	my $mtime = (stat _)[9];
>  
>  	my $uri = $r->uri;
>  	# turn into a package name
> 
> 



_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:stas@stason.org   http://apachetoday.com http://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org



Mime
View raw message