summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorCharles Bailey <bailey@newman.upenn.edu>2000-05-25 04:46:54 +0000
committerbailey <bailey@newman.upenn.edu>2000-05-25 04:46:54 +0000
commitbdb84599aeb6d8fcc1319c109c1240cbc6c835db (patch)
tree2a9a790f385e4e4c15a0bebd787429378f4eb4bf /lib/File
parent75f2fcd2d4e92959bb7df9fd5b239834d7ebac6f (diff)
downloadperl-bdb84599aeb6d8fcc1319c109c1240cbc6c835db.tar.gz
Allow eliminate_macros() and fixpath() to handle space-delimited
lists (based on fixes by Craig Berry) p4raw-id: //depot/vmsperl@6121
Diffstat (limited to 'lib/File')
-rw-r--r--lib/File/Spec/VMS.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm
index d2be87c660..cc06ca636d 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));