From 61196b433b2b458067aac126f3445f9f93f75b12 Mon Sep 17 00:00:00 2001 From: "Craig A. Berry" Date: Thu, 22 Jul 2010 15:31:02 -0500 Subject: [PATCH] Colon delimiter and escaped delimiters for File::Spec::VMS. Still awaiting upstream integration after 15 months at: --- cpan/Cwd/lib/File/Spec/VMS.pm | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/cpan/Cwd/lib/File/Spec/VMS.pm b/cpan/Cwd/lib/File/Spec/VMS.pm index 34b592a..f3c3905 100644 --- a/cpan/Cwd/lib/File/Spec/VMS.pm +++ b/cpan/Cwd/lib/File/Spec/VMS.pm @@ -202,13 +202,13 @@ sub catdir { $path_unix = 1 if ($path =~ m#/#); $path_unix = 1 if ($path =~ /^\.\.?$/); my $path_vms = 0; - $path_vms = 1 if ($path =~ m#[\[<\]]#); + $path_vms = 1 if ($path =~ m#(?:" are not delimiters if preceded by '^' - # Quite a bit of Perl does not know that yet. - if ($spath =~ /^[^\)\]\/:>]+\)\Z(?!\n)/s && basename($file) eq $file) { + if ($spath =~ /^(?]+\)\Z(?!\n)/s && basename($file) eq $file) { $rslt = "$spath$file"; } else { if ($efs) { @@ -427,7 +425,7 @@ sub catfile { $spath_unix = 1 if ($spath =~ m#/#); $spath_unix = 1 if ($spath =~ /^\.\.?$/); my $spath_vms = 0; - $spath_vms = 1 if ($spath =~ m#[\[<\]]#); + $spath_vms = 1 if ($spath =~ m#(? is enabled. + /tmp if C is enabled. sys$scratch: $ENV{TMPDIR} @@ -638,7 +636,7 @@ sub splitpath { my $vmsify_path = vmsify($path); if ($efs) { my $path_vms = 0; - $path_vms = 1 if ($path =~ m#[\[<\]]#); + $path_vms = 1 if ($path =~ m#(?SUPER::splitpath($path, $nofile); @@ -699,7 +697,7 @@ sub splitdir { # [--. ==> [-.-. # .--] ==> .-.-] # [--] ==> [-.-] - $dirspec = "[$dirspec]" unless $dirspec =~ /[\[<]/; # make legal + $dirspec = "[$dirspec]" unless $dirspec =~ /(?]\Z(?!\n)//s; @@ -724,7 +722,7 @@ sub catpath { $dir_unix = 1 if ($dir =~ m#/#); $dir_unix = 1 if ($dir =~ /^\.\.?$/); my $dir_vms = 0; - $dir_vms = 1 if ($dir =~ m#[\[<\]]#); + $dir_vms = 1 if ($dir =~ m#(?