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

People
Owner: Nobody in particular
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

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



Subject: 0.31 test suite breaks with File::Spec < 3.25_01
With File::Spec < 3.25_01: $ AUTHOR_TESTING=1 ./Build test t/01-basic............ok t/02-foreign..........# Test 19 got: "C:\\\\Program Files" (t/02-foreign.t at line 53) # Expected: "C:\\Program Files" # t/02-foreign.t line 53 is: ok $dir->subdir('Program Files'), 'C:\\Program Files'; FAILED test 19 Failed 1/28 tests, 96.43% okay (less 2 skipped tests: 25 okay, 89.29%) t/03-filesystem.......ok t/04-subclass.........ok t/05-traverse.........ok t/06-traverse_filt....ok t/07-recurseprune.....ok t/author-critic.......ok Failed 1/8 test scripts, 87.50% okay. 1/205 subtests failed, 99.51% okay. Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/02-foreign.t 28 1 3.57% 19 2 subtests skipped. File::Spec 3.25 and earlier fail like this with Path::Class 0.31. Path::Class 0.29 did not have this problem. Tested on various versions of Fedora Linux.
This is due to a bug fix in File::Spec::Win32: % perl -I PathTools-3.25/lib -MFile::Spec::Win32 -le 'print File::Spec::Win32->catdir("", "", "Program Files")' \\Program Files % perl -I PathTools-3.40/lib -MFile::Spec::Win32 -le 'print File::Spec::Win32->catdir("", "", "Program Files")' \Program Files One solution would be to increase the minimum version of File::Spec required to 3.26. Currently it's 0.87. I haven't pinpointed the Path::Class change that exposed this problem, but it's likely 5123bc02cd7abf1c833d37f63c1ed59a6ab8a69a, which optimized the creation of Dir objects from existing Dir objects. -Ken
From: paul [...] city-fan.org
On Wed Feb 06 10:56:06 2013, KWILLIAMS wrote: Show quoted text
> This is due to a bug fix in File::Spec::Win32: > > % perl -I PathTools-3.25/lib -MFile::Spec::Win32 -le 'print > File::Spec::Win32->catdir("", "", "Program Files")' > > \\Program Files > > % perl -I PathTools-3.40/lib -MFile::Spec::Win32 -le 'print > File::Spec::Win32->catdir("", "", "Program Files")' > > \Program Files > > One solution would be to increase the minimum version of File::Spec > required to 3.26. Currently it's 0.87.
That would be fine by me, but would affect anyone using Perl < 5.10.0 that's stuck with the File::Spec that came with their Perl, which I could imagine being the case in some "enterprise" situations. Another approach might be to pull the needed bits from File::Spec into Path::Class but then that would mean maintaining a whole lot of extra code, so again is less than optimal. Given that "enterprise" users of old Perls are unlikely to be looking at new versions of Path::Class, I think bumping the dependency is probably the best option, unless there's a straightforward way of avoiding the File::Spec bug.
Hi Paul, I've increased the prerequisite to 3.26. Thanks again for the report.