p4raw-id: //depot/perl@23443
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;
package Cwd;
-$VERSION = $VERSION = '2.21';
+$VERSION = $VERSION = '3.01';
=head1 NAME
use strict;
use vars qw(@ISA $VERSION);
-$VERSION = '0.90';
+$VERSION = '3.01';
$VERSION = eval $VERSION;
my %module = (MacOS => 'Mac',
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 ) ) {