Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 27303
Status: rejected
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: adrianissott [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.2808
Fixed in: (no value)



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
Download test_ModuleInfo.zip
application/x-zip-compressed 1.1k

Message body not shown because it is not plain text.

RT-Send-CC: module-build [...] perl.org
On Sat May 26 10:26:44 2007, adriani wrote: Show quoted text
> 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.
I don't think that this is a problem we want to fix. The primary use of Module::Build::ModuleInfo is finding modules during the build process. This case-sensitive code smokes out cross-platform incompatible typos *before* code gets shipped to CPAN and automatically tested on hundreds of Linux machines. For example, "requires => {cwd => 0}" would find Cwd.pm if we made this change. That would be bad because everyone's CPAN client would go looking for a "cwd" package. Also note that perl treats package names in a case-sensitive way. "use Foo;" followed by "use foo;" will cause perl to first load Foo.pm and then also foo.pm. It will also create two %INC entries and warn about redefined subroutines. In the end, the bug is in the filesystem. --Eric
Subject: Re: [rt.cpan.org #27303] Module::Build::ModuleInfo fails to find some names on case insensitive filesystems [+ fix]
Date: Wed, 18 Jul 2007 21:29:03 +0100
To: <bug-Module-Build [...] rt.cpan.org>
From: "Adrian Issott" <adrianissott [...] hotmail.com>
Hi Eric, Unfortunately I think you're right :-} Cheers, Adrian Show quoted text
----- Original Message ----- From: " via RT" <bug-Module-Build@rt.cpan.org> To: <adrianissott@hotmail.com> Sent: Sunday, July 15, 2007 6:52 AM Subject: [rt.cpan.org #27303] Module::Build::ModuleInfo fails to find some names on case insensitive filesystems [+ fix]
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=27303 > > > On Sat May 26 10:26:44 2007, adriani wrote:
>> 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.
> > I don't think that this is a problem we want to fix. The primary use of > Module::Build::ModuleInfo is finding modules during the build process. > This case-sensitive code smokes out cross-platform incompatible typos > *before* code gets shipped to CPAN and automatically tested on hundreds > of Linux machines. > > For example, "requires => {cwd => 0}" would find Cwd.pm if we made this > change. That would be bad because everyone's CPAN client would go > looking for a "cwd" package. > > Also note that perl treats package names in a case-sensitive way. "use > Foo;" followed by "use foo;" will cause perl to first load Foo.pm and > then also foo.pm. It will also create two %INC entries and warn about > redefined subroutines. In the end, the bug is in the filesystem. > > --Eric >