The tests ext/File/Glob/t/basic.t and ext/POSIX/t/posix.t need to know
if VMS is in the UNIX compatible mode.
I could not find any maintainers listed for these.
-John
wb8...@gmail.com
Personal Opinion Only
--- /rsync_root/perl/ext/File/Glob/t/basic.t Mon Apr 14 06:47:31 2008
+++ ext/File/Glob/t/Basic.t Sun Nov 23 16:35:04 2008
@@ -19,6 +19,23 @@
BEGIN {use_ok('File::Glob', ':glob')};
use Cwd ();
+my $vms_unix_rpt = 0;
+my $vms_efs = 0;
+my $vms_mode = 0;
+if ($^O eq 'VMS') {
+ if (eval 'require VMS::Feature') {
+ $vms_unix_rpt = VMS::Feature::current("filename_unix_report");
+ $vms_efs = VMS::Feature::current("efs_charset");
+ } else {
+ my $unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
+ my $efs_charset = $ENV{'DECC$EFS_CHARSET'} || '';
+ $vms_unix_rpt = $unix_rpt =~ /^[ET1]/i;
+ $vms_efs = $efs_charset =~ /^[ET1]/i;
+ }
+ $vms_mode = 1 unless ($vms_unix_rpt);
+}
+
+
# look for the contents of the current directory
$ENV{PATH} = "/bin";
delete @ENV{qw(BASH_ENV CDPATH ENV IFS)};
@@ -109,7 +126,7 @@
print "# @a\n";
-is_deeply(\...@a, [($^O eq 'VMS'? 'test.' : 'TEST'), 'a', 'b']);
+is_deeply(\...@a, [($vms_mode ? 'test.' : 'TEST'), 'a', 'b']);
# "~" should expand to $ENV{HOME}
$ENV{HOME} = "sweet home";
--- /rsync_root/perl/ext/POSIX/t/posix.t Thu Aug 16 06:16:44 2007
+++ ext/POSIX/t/posix.t Sun Nov 23 18:19:34 2008
@@ -28,6 +28,28 @@
$Is_UWin = $^O eq 'uwin';
$Is_OS390 = $^O eq 'os390';
+my $vms_unix_rpt = 0;
+my $vms_efs = 0;
+my $unix_mode = 1;
+
+if ($Is_VMS) {
+ $unix_mode = 0;
+ if (eval 'require VMS::Feature') {
+ $vms_unix_rpt = VMS::Feature::current("filename_unix_report");
+ $vms_efs = VMS::Feature::current("efs_charset");
+ } else {
+ my $unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
+ my $efs_charset = $ENV{'DECC$EFS_CHARSET'} || '';
+ $vms_unix_rpt = $unix_rpt =~ /^[ET1]/i;
+ $vms_efs = $efs_charset =~ /^[ET1]/i;
+ }
+
+ # Traditional VMS mode only if VMS is not in UNIX compatible mode.
+ $unix_mode = ($vms_efs && $vms_unix_rpt);
+
+}
+
+
ok( $testfd = open("TEST", O_RDONLY, 0), 'O_RDONLY with open' );
read($testfd, $buffer, 4) if $testfd > 2;
is( $buffer, "#!./", ' with read' );
@@ -128,11 +150,11 @@
if ($Is_MacOS) {
$pat = qr/:t:$/;
}
-elsif ( $Is_VMS ) {
- $pat = qr/\.T]/i;
+elsif ( $unix_mode ) {
+ $pat = qr#[\\/]t$#i;
}
else {
- $pat = qr#[\\/]t$#i;
+ $pat = qr/\.T]/i;
}
like( getcwd(), qr/$pat/, 'getcwd' );