Sat Mar 20 15:39:18 2010: Request 55746 was acted upon.
Transaction: Ticket created by zef...@fysh.org
       Queue: Module-ScanDeps
     Subject: hash-as-condition bug in Module::ScanDeps::DataFeed
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: zef...@fysh.org
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=55746 >


There's a bug in Module::ScanDeps::DataFeed where it uses a hash variable
in a truth-value context.  This isn't a well-behaved operation, and
empirically it causes M:SD to fail quite unnecessarily on Perl 5.8.1/2.
The conditional is actually not required at all.  Attached patch fixes.

-zefram

diff -ur Module-ScanDeps-0.96.orig/lib/Module/ScanDeps/DataFeed.pm 
Module-ScanDeps-0.96.mod0/lib/Module/ScanDeps/DataFeed.pm
--- Module-ScanDeps-0.96.orig/lib/Module/ScanDeps/DataFeed.pm   2009-06-22 
20:51:03.000000000 +0100
+++ Module-ScanDeps-0.96.mod0/lib/Module/ScanDeps/DataFeed.pm   2010-03-20 
19:34:19.000000000 +0000
@@ -96,7 +96,7 @@
     return unless defined &{"$mod\::bootstrap"};
 
     eval { require B; require Config; 1 } or return;
-    my $dl_ext = $Config::Config{dlext} if %Config::Config;
+    my $dl_ext = $Config::Config{dlext};
 
     # Copied from XSLoader
     my @modparts = split(/::/, $mod);

Reply via email to