in reply to Re^3: File::Spec::Win32 returning different result than File::Spec when doing catfile with empty string
in thread File::Spec::Win32 returning different result than File::Spec when doing catfile with empty string
warn "Test data is in Unix format; may not work on $^O" unless File::Spec->isa('File::Spec::Unix');
Fails on Win32, because File::Spec::Win32 inherits from File::Spec::Unix (see line 11 of File::Spec::Win32 v3.75). Another design issue in File::Spec (in addition to case_tolerant()). File::Spec::Unix is also used as base class for other, unrelated operating systems, instead of using an explicit base class.
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\alex>perl -MFile::Spec -E "say File::Spec->isa('File::Spec::W +in32')" 1 C:\Users\alex>perl -MFile::Spec -E "say File::Spec->isa('File::Spec::U +nix')" 1 C:\Users\alex>
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: File::Spec::Win32 returning different result than File::Spec when doing catfile with empty string
by jcb (Parson) on Sep 09, 2019 at 19:20 UTC | |
by afoken (Chancellor) on Sep 09, 2019 at 19:41 UTC | |
by jcb (Parson) on Sep 09, 2019 at 23:06 UTC | |
by jcb (Parson) on Sep 11, 2019 at 03:18 UTC | |
by Your Mother (Archbishop) on Sep 09, 2019 at 20:05 UTC |