From 099f76bb8eab859fbb7b90260152c1ead1bf3022 Mon Sep 17 00:00:00 2001 From: Charles Bailey Date: Fri, 17 Mar 2000 04:23:35 +0000 Subject: Quick pre-release fixes: clean up results in File::Spec::VMS and switch dir test order in taint.t to accomodate DECCRTL extension. p4raw-id: //depot/vmsperl@5778 --- lib/File/Spec/VMS.pm | 6 +++--- t/op/taint.t | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index 28c1050576..a2ac8cac0b 100644 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@ -144,7 +144,7 @@ sub canonpath { else { $path =~ s-\]\[--g; $path =~ s/> foo.bar $path =~ s/([\[<])000000\./$1/; # [000000.foo ==> foo - 1 while $path =~ s{-\.-}{--}; # -.- ==> -- + 1 while $path =~ s{([\[<-])\.-}{$1-}; # [.-.- ==> [-- $path =~ s/\.[^\[<\.]+\.-([\]\>])/$1/; # bar.foo.-] ==> bar] $path =~ s/([\[<])(-+)/$1 . "\cx" x length($2)/e; # encode leading '-'s $path =~ s/([\[<\.])([^\[<\.\cx]+)\.-\.?/$1/g; # bar.-.foo ==> foo @@ -184,7 +184,7 @@ sub catdir { elsif ($dir =~ /^\$\([^\)]+\)\z/s) { $rslt = $dir; } else { $rslt = vmspath($dir); } } - return $rslt; + return $self->canonpath($rslt); } =item catfile @@ -212,7 +212,7 @@ sub catfile { } } else { $rslt = (defined($file) && length($file)) ? vmsify($file) : ''; } - return $rslt; + return $self->canonpath($rslt); } diff --git a/t/op/taint.t b/t/op/taint.t index 6a9537b057..9db2d0ced0 100755 --- a/t/op/taint.t +++ b/t/op/taint.t @@ -137,7 +137,7 @@ print "1..149\n"; } else { $tmp = (grep { defined and -d and (stat _)[2] & 2 } - qw(/tmp /var/tmp /usr/tmp /sys$scratch), + qw(sys$scratch /tmp /var/tmp /usr/tmp), @ENV{qw(TMP TEMP)})[0] or print "# can't find world-writeable directory to test PATH\n"; } -- cgit v1.2.1