diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-02-17 18:14:19 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-02-17 18:14:19 +0000 |
commit | 99f36a739b86a289062066efb312754683ab485a (patch) | |
tree | 39dbc8ad64a9d609173dcc2642bfeadb8d6f0c0b /lib/File/Spec/VMS.pm | |
parent | ebb9462d35b8e2e4f8f628bc4e3e7af9194b146a (diff) | |
download | perl-99f36a739b86a289062066efb312754683ab485a.tar.gz |
Upgrade to PathTools 3.04
(plus tweaks to Cwd and cwd.t to run when building perl)
p4raw-id: //depot/perl@23977
Diffstat (limited to 'lib/File/Spec/VMS.pm')
-rw-r--r-- | lib/File/Spec/VMS.pm | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index 82d639f3f1..e085e0a63d 100644 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@ -182,7 +182,7 @@ sub canonpath { $path =~ s/\.[^\]\.]+\.-\./\./g; # .foo.-. ==> . $path =~ s/\[[^\]\.]+\.-\./\[/g; # [foo.-. ==> [ $path =~ s/\.[^\]\.]+\.-\]/\]/g; # .foo.-] ==> ] - $path =~ s/\[[^\]\.]+\.-\]/\[\]/g; # [foo.-] ==> [] + $path =~ s/\[[^\]\.]+\.-\]/\[000000\]/g;# [foo.-] ==> [000000] $path =~ s/\[\]//; # [] ==> return $path; } @@ -477,7 +477,11 @@ sub rel2abs { my $self = shift ; my ($path,$base ) = @_; return undef unless defined $path; - $path = vmsify($path) if $path =~ m/\//; + if ($path =~ m/\//) { + $path = ( -d $path || $path =~ m/\/\z/ # educated guessing about + ? vmspath($path) # whether it's a directory + : vmsify($path) ); + } $base = vmspath($base) if defined $base && $base =~ m/\//; # Clean up and split up $path if ( ! $self->file_name_is_absolute( $path ) ) { @@ -518,6 +522,13 @@ sub rel2abs { =back +=head1 COPYRIGHT + +Copyright (c) 2004 by the Perl 5 Porters. All rights reserved. + +This program is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + =head1 SEE ALSO See L<File::Spec> and L<File::Spec::Unix>. This package overrides the |