From: Nicholas Clark Date: Sun, 31 Oct 2004 11:19:47 +0000 (+0000) Subject: Assimilate PathTools 3.01 (File::Spec and Cwd) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=21f4e7e5deb9dcacb7ae8fa00f7857b644748023;p=p5sagit%2Fp5-mst-13.2.git Assimilate PathTools 3.01 (File::Spec and Cwd) p4raw-id: //depot/perl@23443 --- diff --git a/ext/Cwd/t/cwd.t b/ext/Cwd/t/cwd.t index fecb39f..2c7624b 100644 --- a/ext/Cwd/t/cwd.t +++ b/ext/Cwd/t/cwd.t @@ -20,7 +20,7 @@ my $tests = 24; my $EXTRA_ABSPATH_TESTS = $ENV{PERL_CORE} || $ENV{TEST_PERL_CWD_CODE}; # _perl_abs_path() currently only works when the directory separator # is '/', so don't test it when it won't work. -$EXTRA_ABSPATH_TESTS &= $Config{prefix} =~ m/\//; +$EXTRA_ABSPATH_TESTS &&= $Config{prefix} =~ m/\//; $tests += 3 if $EXTRA_ABSPATH_TESTS; plan tests => $tests; diff --git a/lib/Cwd.pm b/lib/Cwd.pm index a90e944..febd296 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -1,5 +1,5 @@ package Cwd; -$VERSION = $VERSION = '2.21'; +$VERSION = $VERSION = '3.01'; =head1 NAME diff --git a/lib/File/Spec.pm b/lib/File/Spec.pm index 93e363d..a2c4b97 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 = '0.90'; +$VERSION = '3.01'; $VERSION = eval $VERSION; my %module = (MacOS => 'Mac', diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index c81c625..82d639f 100644 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@ -477,11 +477,7 @@ sub rel2abs { my $self = shift ; my ($path,$base ) = @_; return undef unless defined $path; - if ($path =~ m/\//) { - $path = ( -d $path || $path =~ m/\/\z/ # educated guessing about - ? vmspath($path) # whether it's a directory - : vmsify($path) ); - } + $path = vmsify($path) if $path =~ m/\//; $base = vmspath($base) if defined $base && $base =~ m/\//; # Clean up and split up $path if ( ! $self->file_name_is_absolute( $path ) ) {