httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject Re: [PATCH] full[er] disclosure on module not-found
Date Wed, 26 May 2004 14:52:27 GMT

> I think it's OK to add any extra logging in the verbose mode though
> (when -verbose is passed) if you find it helpful as a developer. The
> verbose mode is for developers and for when users have problems, so any
> extra useful info is a goodness.

yeah, that's a good idea.

>> nevertheless, it might be useful if you swapped the logic around, adding
>> additional $why only if the error isn't the standard "Can't locate
>> in
>> @INC..."
> Yes, I don't quite understand what's the added value of your patch, as
> you add the extra output when it can't find the file. Where is your
> supporting email, talks about the opposite case. You probably wanted
> something like:
>   $why .= "$@" unless $@ =~ /^Can't locate/;

ken and I talked about this over irc.  the issues he had seemed to stem from
the fact that the error thrown from use() isn't always intuitive to non-perl
folks.  specifically, the error message from have_module is 'couldn't find
module' which is a bit misleading - in many cases perl can "find" the module
just fine, but it can't be used due to missing dependencies (ken's current

so, I'd suggest making the the have_module message a bit clearer, maybe
something like 'module $module not available' or somesuch.

also, ken pointed out that $@ will contain "Can't locate in @INC" if
you use() and use()s and is missing.  so

  $@ =~ /^Can't locate/;

should probably be something like

  $@ =~ /^Can't locate $module/;

or somesuch, so that a missing is not reported verbosely, but a
missing is.

then again, if the current behavior can be maintained and $@ printed only in
-verbose mode you don't really need a regex at all.


View raw message