John E. Malmberg wrote:
John E. Malmberg wrote:
Ken Williams wrote:
On Nov 19, 2007, at 8:54 AM, John E. Malmberg wrote:
The Cwd.pm in blead is different than CPAN right now for VMS,
Actually I just compared, and it looks like the 3.25_01 release of
PathTools never got integrated into blead. Is that a desirable
thing to do? From my perspective it would be (it's more stable and
has more consistent results across platforms), but I'm not sure what
the status of the code freeze is.
We could call it 3.26 if desired.
I just copied the portions that would affect VMS over my working copy
of blead.
The overnight run resulted in tests cwd.t, Spec,t, and crossplatform.t
failing on VMS 8.3 built with symbolic link support.
I will look into these failures tonight.
I have not been able to find a way to get cwd.t and spec.t to fail when
running them standalone.
crossplatform.t was generating diagnostic messages for VMS in the
cannonpath() routine.
The attached patch fixes lib/File/Spec/VMS.pm, to not try to do a regex
on empty input.
So this patch and the one I submitted on 11/25 for cwd.t is all that is
needed to get the cpan 3.25_01 working on VMS for blead.
-John
[EMAIL PROTECTED]
Personal Opinion Only
--- /rsync_root/perl/lib/File/Spec/VMS.pm Wed Jun 20 22:18:08 2007
+++ lib/File/Spec/VMS.pm Mon Nov 26 23:07:16 2007
@@ -4,7 +4,7 @@
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 @@
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 @@
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 @@
# [--] ==> [-.-]
$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;
}