Skip Menu |

This queue is for tickets about the File-Spec CPAN distribution.

Report information
The Basics
Id: 1790
Status: new
Priority: 0/
Queue: File-Spec

People
Owner: Nobody in particular
Requestors: marek.rouchal [...] infineon.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.82
Fixed in: (no value)



Subject: File::Spec does not support MacOS X (darwin) properly
Hi there, Blair Zajac blairATorcaware.com found a bug in Pod::Find, which I traced back to what I think is a bug in File::Spec. We're both running perl-5.8.0 (Mac OS X and Solaris/Linux). File::Spec does not recognize the Mac OS X properly ($^O eq 'darwin' there), and it seems that Mac OS (classic and X? I'm not sure) is case tolerant, which is not properly defined in Spec/Mac.pm. I have attached a patch that should fix these issues. But be careful: In perl-5.8.0 there are many updates of File::Spec and friends, which probably should be merged into the standalone File::Spec module; the problem I see here: The 5.8.0 File::Spec uses "our (@VERSION)" and the like, so it wouldn't work with previous Perl versions. IMHO File::Spec 0.84 should contain the changes done in perl-5.8.0 (but replace our(...) with use vars qw(...)), plus the fix for MacOS. The perl-5.8.x-maintainer then should merge File::Spec 0.84 back to the core distribution. What do you think? Cheers, Marek
diff -ruN File-Spec-0.82/Spec/Mac.pm File-Spec-0.82+/Spec/Mac.pm --- File-Spec-0.82/Spec/Mac.pm 2000-07-01 12:26:06.000000000 +0200 +++ File-Spec-0.82+/Spec/Mac.pm 2002-11-15 09:22:38.779166000 +0100 @@ -4,13 +4,13 @@ use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '1.2'; +$VERSION = '1.3'; @ISA = qw(File::Spec::Unix); =head1 NAME -File::Spec::Mac - File::Spec for MacOS +File::Spec::Mac - File::Spec for MacOS and MacOS X (darwin) =head1 SYNOPSIS @@ -184,6 +184,16 @@ return "::"; } +=item case_tolerant + +Returns true - case is preserved, but differences in case are tolerated. + +=cut + +sub case_tolerant { + return 1; +} + =item file_name_is_absolute Takes as argument a path and returns true, if it is an absolute path. In diff -ruN File-Spec-0.82/Spec.pm File-Spec-0.82+/Spec.pm --- File-Spec-0.82/Spec.pm 2000-06-27 11:42:25.000000000 +0200 +++ File-Spec-0.82+/Spec.pm 2002-11-15 09:20:17.087643000 +0100 @@ -6,6 +6,7 @@ $VERSION = 0.82 ; my %module = (MacOS => 'Mac', + darwin => 'Mac', # darwin is Mac OS X MSWin32 => 'Win32', os2 => 'OS2', VMS => 'VMS');