httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: [Fwd: Re: Modperl 2.0 Not finding correct *.conf]
Date Thu, 15 Jan 2004 19:09:17 GMT
Geoffrey Young wrote:
> Stas Bekman wrote:
>>any objections for this patch?
>>-    if (-e $result) {
>>-        debug "$file successfully resolved to existing file $result";
> well, you're removing the file check in favor of a directory check.  in the
> interests of debugging, I'd probably like to preserve the check and throw a
> warning when $dir exists but the resolved file does not.  I think the caller
> is responsible for making sure the file exists because it may or may not
> care and result of the call is the same no matter what.  but it was nice to
> have the debug output the last time I worked on this chunk of code.

yes, but we don't want users to complain about:

*** file /etc/httpd/conf.d/*.conf does not exist

and several people did already. Obviously /etc/httpd/conf.d/*.conf doesn't 
exist, so what good does this test make? The caller already checks whether the 
output of glob() exists before using it. So I thought that the purpose of this 
function is the same as rel2abs (Which does not check whether the resulting 
file or whatever exists) the only difference is that it uses extra heuristics 
to get the value of the base. Therefore I think checking for the directory is 
the right thing to do.

In any case, adding a check for a file is fine with me as long as you 
s/warning/debug/, so it won't appear in the normal output and users don't send 
false complaints. How about adding it as an extra check on top of this patch?

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message