-------------8<---------- Start Bug Report ------------8<---------- 1. Problem Description:
I believe I've found a bug in Apache::Reload. It shows up when you're using the ReloadTouchFile option -- the effect is that the server gives you a 500 error when the touchfile has not been modified. I believe this is a result of the following code:
I suspect this problem would happen on Linux as well, but I'm encountering it on a Windows machine. This is using Apache 2.0.53 and Apache::Reload 0.09. (Apache::Reload was installed by Activestate's PPM tool as part of mod_perl 2.0.0-RC4).
I believe the problem is the same as described in revision 69750 (http://svn.apache.org/viewcvs.cgi?rev=69750&view=rev), where the code was returning 1 instead of an Apache constant.
Here's the code that I believe is responsible:
96 if ($TouchFile) { 97 warn "Checking mtime of $TouchFile\n" if $DEBUG; 98 my $touch_mtime = (stat $TouchFile)[9] || return 1; 99 return 1 unless $touch_mtime > $TouchTime; 100 $TouchTime = $touch_mtime; 101 open my $fh, $TouchFile or die "Can't open '$TouchFile': $!"; 102 $TouchModules = <$fh>; 103 chomp $TouchModules if $TouchModules; 104 }
When I replaced "return 1" on line 99 with "return Apache::OK", the modules I was using ran successfully, without the 500 error.
(I don't know whether or not the "return 1" on line 98 should also be changed.)
Absolutely right, Chris: both should be return Apache::OK. Care to post a patch here after you've tested it? (since we don't have a test for it, at least not yet)
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com