Assimilate PathTools 3.01 (File::Spec and Cwd)
authorNicholas Clark <nick@ccl4.org>
Sun, 31 Oct 2004 11:19:47 +0000 (11:19 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 31 Oct 2004 11:19:47 +0000 (11:19 +0000)
p4raw-id: //depot/perl@23443

ext/Cwd/t/cwd.t
lib/Cwd.pm
lib/File/Spec.pm
lib/File/Spec/VMS.pm

index fecb39f..2c7624b 100644 (file)
@@ -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;
 
index a90e944..febd296 100644 (file)
@@ -1,5 +1,5 @@
 package Cwd;
-$VERSION = $VERSION = '2.21';
+$VERSION = $VERSION = '3.01';
 
 =head1 NAME
 
index 93e363d..a2c4b97 100644 (file)
@@ -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',
index c81c625..82d639f 100644 (file)
@@ -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 ) ) {