Hello everybody.
Under VMS, these test failures have been reported several times, and no really
satisfactory explanation (not to mention fix) has been offered.
The problem is, that [VMS]TEST.COM defines PERLSHR with the /USER qualifier, meaning
that the definition will only last for the immediately following image execution.
[.lib]vmsish.t test 7 (and several of the other vmsish tests) create a DCL command
file vmsish_test.com, containing (for example):
$ set message/facil/sever/ident/text
$ define/nolog sys$error nl:
$ MCR dka200:[users.jesper.perl5.perl-5_6_0.][000000.t]perl.;1 "-I[-.lib]" -e "use
vmsish qw(exit hushed); exit 44"
This file is executed using backticks. Although the spawned process has PERLSHR
defined from the beginning, the innocent-looking 'set message' and 'define/nolog' each
involve the execution of an image, which cost us the PERLSHR logical name. This is the
explanation of the test failure.
[.pragma]warnings test 216 involves the execution of the following piece of code,
which originates from within [.pragma.warn]op.
# op.c
use warnings 'syntax' ;
exec "$^X -e 1" ;
my $a
This is again executed using backticks, thereby creating a new process, with PERLSHR
defined /USER from the beginning. However, the 'exec' will eventually (deep within
VMS.C.vms_do_exec) translate into a lib$do_command, which will start perl all over
again as the SECOND image activation in that process, thereby no longer having the
correct definition of PERLSHR available.
The following patch to [VMS]TEST.COM removes /USER from the definition of PERLSHR, and
adds the explicit DEASSIGN of PERLSHR after the execution of all the tests:
--- [vms]test.com;1 Mon Mar 6 07:06:46 2000
+++ [vms]test.com Tue May 23 20:31:58 2000
@@ -93,7 +93,7 @@
$! And do it
$ Show Process/Accounting
$ testdir = "Directory/NoHead/NoTrail/Column=1"
-$ Define/User 'dbg'Perlshr Sys$Disk:[-]'dbg'PerlShr'exe'
+$ Define 'dbg'Perlshr Sys$Disk:[-]'dbg'PerlShr'exe'
$ MCR Sys$Disk:[]Perl. "-I[-.lib]" - "''p3'" "''p4'" "''p5'" "''p6'"
$ Deck/Dollar=$$END-OF-TEST$$
# $RCSfile: TEST,v $$Revision: 4.1 $$Date: 92/08/07 18:27:00 $
@@ -240,6 +240,7 @@
$user,$sys,$cuser,$csys,$files,$totmax);
$$END-OF-TEST$$
$ wrapup:
+$ deassign 'dbg'Perlshr
$ Show Process/Accounting
$ If F$Search("Echo.Exe").nes."" Then Delete/Log/NoConfirm Echo.Exe;*
$ Set Default &olddef
====END OF PATCH====
Best regards
Jesper Naur