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: 83699
Status: resolved
Priority: 0/
Queue: Path-Class

People
Owner: Nobody in particular
Requestors: MITHUN [...] cpan.org
Cc:
AdminCc:

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



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
The optimization in new appears to wind up turning "" as a leading element into "//", which File::Spec::Unix canonicalizes back to "/" but Cygwin keeps as "//". I'll explore why it happens. I'm sure there's a way to get it right without gluing and splitting directories over and over. :-)
Thanks, I applied that patch & added a test for it.
On Tue Mar 05 10:47:53 2013, KWILLIAMS wrote: Show quoted text
> Thanks, I applied that patch & added a test for it.
When will this be cut to CPAN? I ask because I want to adjust my prereqs for P9Y::ProcessTable to this patched version.
Subject: Re: [rt.cpan.org #83699] dir Broken on Cygwin
Date: Mon, 18 Mar 2013 20:55:50 -0500
To: bug-Path-Class [...] rt.cpan.org
From: Ken Williams <kwilliams [...] cpan.org>
Coincidentally, I was about to release it to CPAN tonight. I should be done in about ten minutes. On Mon, Mar 18, 2013 at 5:48 PM, Brendan Byrd via RT < bug-Path-Class@rt.cpan.org> wrote: Show quoted text
> Queue: Path-Class > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=83699 > > > On Tue Mar 05 10:47:53 2013, KWILLIAMS wrote:
> > Thanks, I applied that patch & added a test for it.
> > When will this be cut to CPAN? I ask because I want to adjust my prereqs > for P9Y::ProcessTable to this patched version. >