Subject: | Module::Build::ModuleInfo fails to find some names on case insensitive filesystems [+ fix] |
Hi,
I've found that Module::Build::ModuleInfo fails to provide the names
of some modules when it should've been able to. The problem occurs
because Module::Build::ModuleInfo performs a case sensitive match
against filenames which on a case insensitive filesystem is too
restrictive. In test_ModuleInfo.zip I've attached some test code that
shows this.
The following code fixes the problem:
sub _init {
<snip>
- my @candidates = grep /$f$/, @{$self->{packages}};
+ my @candidates;
+ if (File::Spec->case_tolerant()) {
+ @candidates = grep /$f$/i, @{$self->{packages}};
+ } else {
+ @candidates = grep /$f$/, @{$self->{packages}};
+ }
Adrian
PS, I'm running on Windows XP.
PPS Perl -v gives:
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 50 registered patches, see perl -V for more detail)
Copyright 1987-2006, Larry Wall
Binary build 820 [274739] provided by ActiveState
http://www.ActiveState.com
Built Jan 23 2007 15:57:46
Subject: | test_ModuleInfo.zip |
Message body not shown because it is not plain text.