httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: [PATCH] full[er] disclosure on module not-found
Date Tue, 25 May 2004 17:26:40 GMT


Rodent of Unusual Size wrote:
> have_module() currently is rather terse when the problem with a
> perl module is actually with something the module requires or uses.
> here's a patch which will extract a little more info from $@ if it
> can, and provide it as part of the message.  helpful for tracking
> down what is *actually* at fault..

well, in the _vast_ majority of cases I would expect the error message to
read "Can't locate...".  that's the purpose of have_module after all, to
ping if the module is there or not.

in the rare cases where the module is there but can't be loaded (such as
modules in development) it might be useful to have additional information.
but have_module() really isn't there as a development tool - that's what
perl -cw is for :)

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 Bar.pm in
@INC..."

HTH

--Geoff

Mime
View raw message