diff options
author | John E. Malmberg <wb8tyw@qsl.net> | 2007-11-26 17:35:30 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-11-29 10:00:26 +0000 |
commit | 13fbb5b173fcf8b7f4bfad9ead184335a89f5f9f (patch) | |
tree | a7345bf2f0ca2bcc21bf841d7aa3b7cb4db41cc6 /lib | |
parent | 22149ad2867115363d728090e454e2fd3493f96a (diff) | |
download | perl-13fbb5b173fcf8b7f4bfad9ead184335a89f5f9f.tar.gz |
Re: [patch@32376] VMS symbolic links part 4 of 4 - Final part
From: "John E. Malmberg" <wb8tyw@qsl.net>
Message-id: <474BACA2.5060702@qsl.net>
p4raw-id: //depot/perl@32550
Diffstat (limited to 'lib')
-rw-r--r-- | lib/File/Spec/VMS.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index 0802a0370e..968754d719 100644 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@ -4,7 +4,7 @@ use strict; use vars qw(@ISA $VERSION); require File::Spec::Unix; -$VERSION = '1.4_01'; +$VERSION = '3.25_02'; @ISA = qw(File::Spec::Unix); @@ -36,6 +36,8 @@ Removes redundant portions of file specifications according to VMS syntax. sub canonpath { my($self,$path) = @_; + return undef unless defined $path; + if ($path =~ m|/|) { # Fake Unix my $pathify = $path =~ m|/\Z(?!\n)|; $path = $self->SUPER::canonpath($path); @@ -260,6 +262,8 @@ Split dirspec using VMS syntax. sub splitdir { my($self,$dirspec) = @_; + my @dirs = (); + return @dirs if ( (!defined $dirspec) || ('' eq $dirspec) ); $dirspec =~ tr/<>/[]/; # < and > ==> [ and ] $dirspec =~ s/\]\[\./\.\]\[/g; # ][. ==> .][ $dirspec =~ s/\[000000\.\]\[/\[/g; # [000000.][ ==> [ @@ -275,7 +279,7 @@ sub splitdir { # [--] ==> [-.-] $dirspec = "[$dirspec]" unless $dirspec =~ /[\[<]/; # make legal $dirspec =~ s/^(\[|<)\./$1/; - my(@dirs) = split /(?<!\^)\./, vmspath($dirspec); + @dirs = split /(?<!\^)\./, vmspath($dirspec); $dirs[0] =~ s/^[\[<]//s; $dirs[-1] =~ s/[\]>]\Z(?!\n)//s; @dirs; } |