From: Charles Bailey Date: Thu, 25 May 2000 04:46:54 +0000 (+0000) Subject: Allow eliminate_macros() and fixpath() to handle space-delimited X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bdb84599aeb6d8fcc1319c109c1240cbc6c835db;p=p5sagit%2Fp5-mst-13.2.git Allow eliminate_macros() and fixpath() to handle space-delimited lists (based on fixes by Craig Berry) p4raw-id: //depot/vmsperl@6121 --- diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm index d2be87c..cc06ca6 100644 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@ -40,6 +40,11 @@ sub eliminate_macros { my($self,$path) = @_; return '' unless $path; $self = {} unless ref $self; + + if ($path =~ /\s/) { + return join ' ', map { $self->eliminate_macros($_) } split /\s+/, $path; + } + my($npath) = unixify($path); my($complex) = 0; my($head,$macro,$tail); @@ -89,6 +94,12 @@ sub fixpath { $self = bless {} unless ref $self; my($fixedpath,$prefix,$name); + if ($path =~ /\s/) { + return join ' ', + map { $self->fixpath($_,$force_path) } + split /\s+/, $path; + } + if ($path =~ m#^\$\([^\)]+\)\Z(?!\n)#s || $path =~ m#[/:>\]]#) { if ($force_path or $path =~ /(?:DIR\)|\])\Z(?!\n)/) { $fixedpath = vmspath($self->eliminate_macros($path));