summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/dist/PathTools/lib/File/Spec/VMS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/dist/PathTools/lib/File/Spec/VMS.pm')
-rw-r--r--gnu/usr.bin/perl/dist/PathTools/lib/File/Spec/VMS.pm20
1 files changed, 10 insertions, 10 deletions
diff --git a/gnu/usr.bin/perl/dist/PathTools/lib/File/Spec/VMS.pm b/gnu/usr.bin/perl/dist/PathTools/lib/File/Spec/VMS.pm
index c0cc1e50434..cbafdce88ab 100644
--- a/gnu/usr.bin/perl/dist/PathTools/lib/File/Spec/VMS.pm
+++ b/gnu/usr.bin/perl/dist/PathTools/lib/File/Spec/VMS.pm
@@ -1,13 +1,13 @@
package File::Spec::VMS;
use strict;
-use vars qw(@ISA $VERSION);
+use Cwd ();
require File::Spec::Unix;
-$VERSION = '3.63_01';
+our $VERSION = '3.74';
$VERSION =~ tr/_//d;
-@ISA = qw(File::Spec::Unix);
+our @ISA = qw(File::Spec::Unix);
use File::Basename;
use VMS::Filespec;
@@ -97,7 +97,7 @@ sub canonpath {
# [-.-. ==> [--.
# .-.-] ==> .--]
# [-.-] ==> [--]
- 1 while ($path =~ s/(?<!\^)([\[\.])[^\]\.]+\.-(-+)([\]\.])/$1$2$3/);
+ 1 while ($path =~ s/(?<!\^)([\[\.])(?:\^.|[^\]\.])+\.-(-+)([\]\.])/$1$2$3/);
# That loop does the following
# with any amount (minimum 2)
# of dashes:
@@ -108,11 +108,11 @@ sub canonpath {
#
# And then, the remaining cases
$path =~ s/(?<!\^)\[\.-/[-/; # [.- ==> [-
- $path =~ s/(?<!\^)\.[^\]\.]+\.-\./\./g; # .foo.-. ==> .
- $path =~ s/(?<!\^)\[[^\]\.]+\.-\./\[/g; # [foo.-. ==> [
- $path =~ s/(?<!\^)\.[^\]\.]+\.-\]/\]/g; # .foo.-] ==> ]
+ $path =~ s/(?<!\^)\.(?:\^.|[^\]\.])+\.-\./\./g; # .foo.-. ==> .
+ $path =~ s/(?<!\^)\[(?:\^.|[^\]\.])+\.-\./\[/g; # [foo.-. ==> [
+ $path =~ s/(?<!\^)\.(?:\^.|[^\]\.])+\.-\]/\]/g; # .foo.-] ==> ]
# [foo.-] ==> [000000]
- $path =~ s/(?<!\^)\[[^\]\.]+\.-\]/\[000000\]/g;
+ $path =~ s/(?<!\^)\[(?:\^.|[^\]\.])+\.-\]/\[000000\]/g;
# [] ==>
$path =~ s/(?<!\^)\[\]// unless $path eq '[]';
return $unix_rpt ? unixify($path) : $path;
@@ -442,7 +442,7 @@ sub abs2rel {
my $self = shift;
my($path,$base) = @_;
- $base = $self->_cwd() unless defined $base and length $base;
+ $base = Cwd::getcwd() unless defined $base and length $base;
# If there is no device or directory syntax on $base, make sure it
# is treated as a directory.
@@ -514,7 +514,7 @@ sub rel2abs {
if ( ! $self->file_name_is_absolute( $path ) ) {
# Figure out the effective $base and clean it up.
if ( !defined( $base ) || $base eq '' ) {
- $base = $self->_cwd;
+ $base = Cwd::getcwd();
}
elsif ( ! $self->file_name_is_absolute( $base ) ) {
$base = $self->rel2abs( $base ) ;