Skip Menu |

This queue is for tickets about the ExtUtils-Depends CPAN distribution.

Report information
The Basics
Id: 102436
Status: stalled
Priority: 0/
Queue: ExtUtils-Depends

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

Bug Information
Severity: (no value)
Broken in: 0.404
Fixed in: (no value)



Subject: the "load" sub loses double slash from UNC paths
We use UNC paths in our company on Windows for installed perl modules. And in the "load" subroutine of ExtUtils::Depends, it loses the double slash from UNC paths. At present it gets $instpath with below code, # effectively $instpath = dirname($INC{$relpath}) @pieces = File::Spec->splitdir ($INC{$relpath}); pop @pieces; my $instpath = File::Spec->catdir (@pieces); For UNC paths like //server/share/file (\\\\server\\share\\file) as $INC{$relpath}, it finally becomes \\server\\share\\file at $instpath. (This is the behavior of File::Spec's splitdir and catdir. See https://rt.cpan.org/Ticket/Display.html?id=52624 ) And thus the issue makes ExtUtils::Depends fails to provide the correct INC path for Makefile. The solution is also provided in that open ticket at https://rt.cpan.org/Ticket/Display.html?id=52624 For ExtUtils::Depends it can be like below. my ($volume, $directories, $file) = File::Spec->splitpath($INC{$relpath}); @pieces = File::Spec->splitdir ($directories); my $dirs = File::Spec->catdir (@pieces); my $instpath = File::Spec->catpath($volume, $dirs);
Subject: Re: [rt.cpan.org #102436] the "load" sub loses double slash from UNC paths
Date: Sun, 01 Mar 2015 16:15:43 +0100
To: bug-ExtUtils-Depends [...] rt.cpan.org
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
On 01.03.2015 15:38, Zhenyi Zhou via RT wrote: Show quoted text
> For UNC paths like //server/share/file (\\\\server\\share\\file) as $INC{$relpath}, it finally becomes \\server\\share\\file at $instpath. (This is the behavior of File::Spec's splitdir and catdir. See https://rt.cpan.org/Ticket/Display.html?id=52624 ) And thus the issue makes ExtUtils::Depends fails to provide the correct INC path for Makefile. > > The solution is also provided in that open ticket at https://rt.cpan.org/Ticket/Display.html?id=52624 > > For ExtUtils::Depends it can be like below. > my ($volume, $directories, $file) = File::Spec->splitpath($INC{$relpath}); > @pieces = File::Spec->splitdir ($directories); > my $dirs = File::Spec->catdir (@pieces); > my $instpath = File::Spec->catpath($volume, $dirs);
Can you provide a patch that implements this change, preferably with a unit test?
I just made a pull request from github https://github.com/GNOME/perl-ExtUtils-Depends/pull/1 On Sun Mar 01 10:15:54 2015, TSCH wrote: Show quoted text
> On 01.03.2015 15:38, Zhenyi Zhou via RT wrote:
> > For UNC paths like //server/share/file (\\\\server\\share\\file) as > > $INC{$relpath}, it finally becomes \\server\\share\\file at > > $instpath. (This is the behavior of File::Spec's splitdir and catdir. > > See https://rt.cpan.org/Ticket/Display.html?id=52624 ) And thus the > > issue makes ExtUtils::Depends fails to provide the correct INC path > > for Makefile. > > > > The solution is also provided in that open ticket at > > https://rt.cpan.org/Ticket/Display.html?id=52624 > > > > For ExtUtils::Depends it can be like below. > > my ($volume, $directories, $file) = File::Spec-
> > >splitpath($INC{$relpath});
> > @pieces = File::Spec->splitdir ($directories); > > my $dirs = File::Spec->catdir (@pieces); > > my $instpath = File::Spec->catpath($volume, $dirs);
> > Can you provide a patch that implements this change, preferably with a > unit test?
Subject: Re: [rt.cpan.org #102436] the "load" sub loses double slash from UNC paths
Date: Wed, 4 Mar 2015 12:21:10 +0100
To: bug-ExtUtils-Depends [...] rt.cpan.org
From: "Torsten Schönfeld" <kaffeetisch [...] gmx.de>
"Zhenyi Zhou via RT" <bug-ExtUtils-Depends@rt.cpan.org>: Show quoted text
> I just made a pull request from github > https://github.com/GNOME/perl-ExtUtils-Depends/pull/1
The patch looks good. Please also try to add a unit test to ensure that we won't break this functionality in the future.
Subject: Re: [rt.cpan.org #102436] the "load" sub loses double slash from UNC paths
Date: Sun, 6 Dec 2015 13:29:22 +0100
To: bug-ExtUtils-Depends [...] rt.cpan.org, ZHENYZ [...] cpan.org
From: Torsten Schoenfeld <kaffeetisch [...] gmx.de>
On 04.03.2015 11:23, Zhenyi Zhou via RT wrote: Show quoted text
> I just made a pull request from github > https://github.com/GNOME/perl-ExtUtils-Depends/pull/1
Small reminder: we still need tests for this to go in. Also: do we need the splitdir/catdir dance? The only difference I see to just using $directories from splitpath is a trailing slash.
It looks like the original pull request at https://github.com/GNOME/perl-ExtUtils-Depends/pull/1 has vanished. Can you attach the patch here?