This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make File::Spec::VMS->abs2rel handle Unix-format input.
authorCraig A. Berry <craigberry@mac.com>
Sat, 13 Feb 2016 15:47:11 +0000 (09:47 -0600)
committerCraig A. Berry <craigberry@mac.com>
Sat, 13 Feb 2016 15:47:11 +0000 (09:47 -0600)
commit3420b9a3ac5c603e264b6d5f4e1a58dee36532e4
tree1dc4094d1081fbde58eb5d04e69dfa2a70624821
parent47ed9d9e89922a8e165d6dfc5737772cc5ee7a45
Make File::Spec::VMS->abs2rel handle Unix-format input.

We had been living under the illusion that when passed Unix-format
input, this routine could just punt to File::Spec::Unix-abs2rel.
However, the latter calls canonpath, which returns native specs,
and we ended up mixing native semantics with Unix-format
semantics and got nonsense.

For example, abs2rel('/d1/foo/bar.pl') could become '[bar.pl]'.

So instead we now follow the same basic logic regardless of input
format and there are tests to make sure abs2rel works with both.
12 files changed:
dist/PathTools/Cwd.pm
dist/PathTools/lib/File/Spec.pm
dist/PathTools/lib/File/Spec/AmigaOS.pm
dist/PathTools/lib/File/Spec/Cygwin.pm
dist/PathTools/lib/File/Spec/Epoc.pm
dist/PathTools/lib/File/Spec/Functions.pm
dist/PathTools/lib/File/Spec/Mac.pm
dist/PathTools/lib/File/Spec/OS2.pm
dist/PathTools/lib/File/Spec/Unix.pm
dist/PathTools/lib/File/Spec/VMS.pm
dist/PathTools/lib/File/Spec/Win32.pm
dist/PathTools/t/Spec.t