From: Steve Peters Date: Tue, 12 Feb 2008 15:11:48 +0000 (+0000) Subject: Upgrade to PathTools-3.2701 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=795ee8854b262cd1b42821306f6db81e63bd7b3d;p=p5sagit%2Fp5-mst-13.2.git Upgrade to PathTools-3.2701 p4raw-id: //depot/perl@33294 --- diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 0896327..b93c003 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -171,7 +171,7 @@ use strict; use Exporter; use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION); -$VERSION = '3.27'; +$VERSION = '3.2701'; @ISA = qw/ Exporter /; @EXPORT = qw(cwd getcwd fastcwd fastgetcwd); diff --git a/lib/File/Spec.pm b/lib/File/Spec.pm index 3a83b99..53d4a5a 100644 --- a/lib/File/Spec.pm +++ b/lib/File/Spec.pm @@ -3,7 +3,7 @@ package File::Spec; use strict; use vars qw(@ISA $VERSION); -$VERSION = '3.27'; +$VERSION = '3.2701'; $VERSION = eval $VERSION; my %module = (MacOS => 'Mac', diff --git a/lib/File/Spec/Cygwin.pm b/lib/File/Spec/Cygwin.pm index df2904f..1b2c045 100644 --- a/lib/File/Spec/Cygwin.pm +++ b/lib/File/Spec/Cygwin.pm @@ -4,7 +4,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '3.27'; +$VERSION = '3.2701'; @ISA = qw(File::Spec::Unix); diff --git a/lib/File/Spec/Epoc.pm b/lib/File/Spec/Epoc.pm index 67dd04b..1e0ad18 100644 --- a/lib/File/Spec/Epoc.pm +++ b/lib/File/Spec/Epoc.pm @@ -3,7 +3,7 @@ package File::Spec::Epoc; use strict; use vars qw($VERSION @ISA); -$VERSION = '3.27'; +$VERSION = '3.2701'; require File::Spec::Unix; @ISA = qw(File::Spec::Unix); diff --git a/lib/File/Spec/Functions.pm b/lib/File/Spec/Functions.pm index 1f95a50..ab335e1 100644 --- a/lib/File/Spec/Functions.pm +++ b/lib/File/Spec/Functions.pm @@ -5,7 +5,7 @@ use strict; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); -$VERSION = '3.27'; +$VERSION = '3.2701'; require Exporter; diff --git a/lib/File/Spec/Mac.pm b/lib/File/Spec/Mac.pm index 4122c10..97fa676 100644 --- a/lib/File/Spec/Mac.pm +++ b/lib/File/Spec/Mac.pm @@ -4,7 +4,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '3.27'; +$VERSION = '3.2701'; @ISA = qw(File::Spec::Unix); diff --git a/lib/File/Spec/OS2.pm b/lib/File/Spec/OS2.pm index 66a2e33..48d09fa 100644 --- a/lib/File/Spec/OS2.pm +++ b/lib/File/Spec/OS2.pm @@ -4,7 +4,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '3.27'; +$VERSION = '3.2701'; @ISA = qw(File::Spec::Unix); diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm index 0fb4943..e8dbaa9 100644 --- a/lib/File/Spec/Unix.pm +++ b/lib/File/Spec/Unix.pm @@ -3,7 +3,7 @@ package File::Spec::Unix; use strict; use vars qw($VERSION); -$VERSION = '3.27'; +$VERSION = '3.2701'; =head1 NAME diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index b038b66..747a89d 100644 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@ -4,7 +4,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '3.27'; +$VERSION = '3.2701'; @ISA = qw(File::Spec::Unix); diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm index 98f2ea2..9b90340 100644 --- a/lib/File/Spec/Win32.pm +++ b/lib/File/Spec/Win32.pm @@ -5,7 +5,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '3.27'; +$VERSION = '3.2701'; @ISA = qw(File::Spec::Unix); @@ -133,6 +133,11 @@ sub catfile { shift, return _canon_cat( "/", @_ ) if $_[0] eq ""; + # Compatibility with File::Spec <= 3.26: + # catfile('A:', 'foo') should return 'A:\foo'. + return _canon_cat( ($_[0].'\\'), @_[1..$#_] ) + if $_[0] =~ m{^$DRIVE_RX\z}o; + return _canon_cat( @_ ); } @@ -146,6 +151,11 @@ sub catdir { shift, return _canon_cat( "/", @_ ) if $_[0] eq ""; + # Compatibility with File::Spec <= 3.26: + # catdir('A:', 'foo') should return 'A:\foo'. + return _canon_cat( ($_[0].'\\'), @_[1..$#_] ) + if $_[0] =~ m{^$DRIVE_RX\z}o; + return _canon_cat( @_ ); } diff --git a/lib/File/Spec/t/Spec.t b/lib/File/Spec/t/Spec.t index 9d06f63..83c22a6 100644 --- a/lib/File/Spec/t/Spec.t +++ b/lib/File/Spec/t/Spec.t @@ -207,6 +207,7 @@ if ($^O eq 'MacOS') { [ "Win32->catdir('A:/')", 'A:\\' ], [ "Win32->catdir('\\', 'foo')", '\\foo' ], [ "Win32->catdir('','','..')", '\\' ], +[ "Win32->catdir('A:', 'foo')", 'A:\\foo' ], [ "Win32->catfile('a','b','c')", 'a\\b\\c' ], [ "Win32->catfile('a','b','.\\c')", 'a\\b\\c' ], @@ -214,6 +215,7 @@ if ($^O eq 'MacOS') { [ "Win32->catfile('c')", 'c' ], [ "Win32->catfile('.\\c')", 'c' ], [ "Win32->catfile('a/..','../b')", '..\\b' ], +[ "Win32->catfile('A:', 'foo')", 'A:\\foo' ], [ "Win32->canonpath('')", '' ],