Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Path-Class CPAN distribution.

Maintainer(s)' notes

I prefer that bugs & patches are filed on GitHub rather than on RT: https://github.com/kenahoo/Path-Class/issues. Thanks.

Report information
The Basics
Id: 16613
Status: open
Priority: 0/
Queue: Path-Class

People
Owner: Nobody in particular
Requestors: chris+rt [...] chrisdolan.net
Cc:
AdminCc:

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



Subject: Classic Mac absolute paths come out as relative in Unix
When converting a Classic Mac path to Unix (i.e. OS 9 to OS X), the absoluteness of the path is lost. For example: use Path::Class qw(foreign_dir); my $dir = foreign_dir("Mac", "Macintosh HD:Users:chris:"); print $dir->as_foreign("Unix"),"\n"; Actual result: Users/chris Expected result: /Users/chris This is with OS X 10.4.3 Perl 5.8.6 (Apple's build) Path::Class 0.15 File::Spec 3.14 Mac::Files 1.09
Thanks for the report. I can indeed reproduce this, but I'm unsure of the best solution. The root cause is that MacOS, unlike some other multi-volume systems (notably win32), has no notion of a per-volume "current working directory". So while C:foo\bar on win32 might refer to C:\baz\foo\bar if \baz is the CWD for C:, there's no analogous situation on MacOS, and thus File::Spec's splitpath() and splitdir() don't give MacOS's paths a leading empty string like they do on other platforms. I think the correct fix for this would probably be to change File::Spec, but I'm not completely sure. Also, note that the most desirable behavior when converting from MacOS paths to OS X paths (probably a pretty common situation) would be to convert "MacHD:foo:bar" to "/Volumes/ MacHD/foo/bar", not just "/foo/bar". That would require some additional machinery too. -Ken
Still don't have a great solution for this one, but I've added some TODO tests for it to the latest release. -Ken