$? is PVLV on VMS (and actually, anywhere else where COMPLEX_STATUS is
authorNicholas Clark <nick@ccl4.org>
Sat, 27 Sep 2008 09:27:59 +0000 (09:27 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 27 Sep 2008 09:27:59 +0000 (09:27 +0000)
defined).

p4raw-id: //depot/perl@34433

ext/XS/APItest/t/svpeek.t

index 528beb7..3afb039 100644 (file)
@@ -30,7 +30,12 @@ $| = 1;
   is (DPeek ($=),    'PVMG()',                 '$=');
   is (DPeek ($-),    'PVMG()',                 '$-');
 like (DPeek ($!), qr'^PVMG\("',                        '$!');
+if ($^O eq 'VMS') {
+  # VMS defines COMPLEX_STATUS and upgrades $? to PVLV
+  is (DPeek ($?),    'PVLV()',                 '$?');
+} else {
   is (DPeek ($?),    'PVMG()',                 '$?');
+}
   is (DPeek ($|),    'PVMG(1)',                        '$|');
 
   "abc" =~ m/(b)/;     # Don't know why these magic vars have this content