This fixes a bug introduced with 5.93_01.  The following comment is
probably associated with the change:

    * Backporting to 5.005_03
 
The problem is the implicit return that perl does was apparently not taken
into consideration, and another command (closedir, in this case) was added,
that wiped out the previously used return value.  One of the dangers of
using implicit returns, and not documenting it.

It might not be a bad thing for someone to audit the rest of the code for
similar issues.  I know that I tend to not make mistakes like this in
isolation.

Also, this wasn't caught by the test suite.  I'm very new to perl module
stuff, so I didn't feel comfortable writing up a test case.  I'm hoping
someone more familiar with the code will though.

Unfortunately, perl-5.8.0 includes a MakeMaker version that has this bug.

Cheers,
mrc


patch -p1 << \EOF
diff -ru ExtUtils-MakeMaker-6.05.orig/lib/ExtUtils/Liblist.pm 
ExtUtils-MakeMaker-6.05/lib/ExtUtils/Liblist.pm
--- ExtUtils-MakeMaker-6.05.orig/lib/ExtUtils/Liblist.pm        2002-05-16 
21:18:06.000000000 -0700
+++ ExtUtils-MakeMaker-6.05/lib/ExtUtils/Liblist.pm     2002-10-17 15:56:34.000000000 
+-0700
@@ -11,8 +11,9 @@
   shift;
   my $rex = qr/$_[1]/;
   opendir DIR, $_[0];
-  grep /$rex/, readdir DIR;
+  my @res = grep /$rex/, readdir DIR;
   closedir DIR;
+  return @res;
 }
 
 __END__
EOF


[PS:  Typical of me to have more commentary than patch.  :-]
-- 
     Mike Castle      [EMAIL PROTECTED]      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc

Reply via email to