From: John E. Malmberg Date: Mon, 26 Nov 2007 23:35:30 +0000 (-0600) Subject: Re: [patch@32376] VMS symbolic links part 4 of 4 - Final part X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=13fbb5b173fcf8b7f4bfad9ead184335a89f5f9f;p=p5sagit%2Fp5-mst-13.2.git Re: [patch@32376] VMS symbolic links part 4 of 4 - Final part From: "John E. Malmberg" Message-id: <474BACA2.5060702@qsl.net> p4raw-id: //depot/perl@32550 --- diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index 0802a03..968754d 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 /(?]\Z(?!\n)//s; @dirs; }