Subject: | dir Broken on Cygwin |
The following example demonstrates the change in behavior in 0.31
-------
#!/usr/bin/perl
use strict;
use warnings FATAL => 'all';
local $| = 1;
use Path::Class;
# Unix
my $unix_dir = Path::Class::Dir->new_foreign('Unix', '', 'tmp', 'foo');
# This prints '/tmp/foo` as expected
print "UNIX Path: " . $unix_dir->stringify(). "\n";
# Unix
my $cyg_dir = Path::Class::Dir->new_foreign('Cygwin', '', 'tmp', 'foo');
# This prints '//tmp/foo` which is a UNC path on cygwin
print "Cygwin Path: " . $cyg_dir->stringify(). "\n";
exit 0;
-------
I'm not sure if this is a bug in File::Spec or Path::Class? File::Spec::Cygwin does seem to have
special handling for UNC paths (`//...`).
-- Mithun