Return-Path: Delivered-To: apmail-httpd-test-dev-archive@www.apache.org Received: (qmail 49501 invoked from network); 24 May 2004 18:24:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 May 2004 18:24:48 -0000 Received: (qmail 75312 invoked by uid 500); 24 May 2004 16:23:48 -0000 Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 75220 invoked by uid 500); 24 May 2004 16:23:47 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 75025 invoked by uid 98); 24 May 2004 16:23:43 -0000 Received: from Ken.Coar@Golux.Com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(66.93.240.231):. Processed in 0.248033 secs); 24 May 2004 16:23:43 -0000 X-Qmail-Scanner-Mail-From: Ken.Coar@Golux.Com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(66.93.240.231):. Processed in 0.248033 secs) Received: from unknown (HELO Hydrogen.MeepZor.Com) (66.93.240.231) by hermes.apache.org with SMTP; 24 May 2004 16:23:43 -0000 Received: from Hydrogen.MeepZor.Com (localhost.localdomain [127.0.0.1]) by Hydrogen.MeepZor.Com (8.12.8/8.12.8) with ESMTP id i4OGMWIX024797; Mon, 24 May 2004 12:22:43 -0400 Received: (from coar@localhost) by Hydrogen.MeepZor.Com (8.12.8/8.12.8/Submit) id i4OGMWn3024795; Mon, 24 May 2004 12:22:32 -0400 X-Authentication-Warning: Hydrogen.MeepZor.Com: coar set sender to Ken.Coar@Golux.Com using -f Date: Mon, 24 May 2004 12:22:32 -0400 From: Rodent of Unusual Size To: test-dev@httpd.apache.org Subject: [PATCH] full[er] disclosure on module not-found Message-ID: <20040524122232.A24783@Hydrogen.MeepZor.Com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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.. any problems with it? it changes the output of have_module(), so i'm not committing it without at least offering it for discussion.. -- #ken P-)} Ken Coar, Sanagendamgagwedweinini http://Ken.Coar.Org/ Author, developer, opinionist http://Apache-Server.Com/ "Millennium hand and shrimp!" --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="have_module_why.patch" Index: Apache-Test/lib/Apache/Test.pm =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm,v retrieving revision 1.80 diff -u -r1.80 Test.pm --- Apache-Test/lib/Apache/Test.pm 21 May 2004 18:29:51 -0000 1.80 +++ Apache-Test/lib/Apache/Test.pm 24 May 2004 16:18:25 -0000 @@ -217,7 +217,10 @@ eval "require $_"; #print $@ if $@; if ($@) { - push @reasons, "cannot find module '$_'"; + my $why = "cannot use module '$_'"; + $@ =~ /^(Can't locate.*?) in \@INC/; + $why .= " ($1)" if ($1); + push @reasons, $why; } } if (@reasons) { --2oS5YaxWCcQjTEyO--