my $bits = 0;
my $sememe;
foreach $sememe (@_) {
- $bits |= 0x10000000, next if $sememe eq 'hushed';
- $bits |= 0x20000000, next if $sememe eq 'status' || $sememe eq '$?';
- $bits |= 0x40000000, next if $sememe eq 'exit';
+ $bits |= 0x20000000, next if $sememe eq 'hushed';
+ $bits |= 0x40000000, next if $sememe eq 'status' || $sememe eq '$?';
$bits |= 0x80000000, next if $sememe eq 'time';
}
$bits;
sub import {
shift;
- $^H |= bits(@_ ? @_ : qw(status exit time hushed));
+ $^H |= bits(@_ ? @_ : qw(status time hushed));
+ my $sememe;
+
+ foreach $sememe (@_ ? @_ : qw(exit)) {
+ $^H{'vmsish_exit'} = 1 if $sememe eq 'exit';
+ }
}
sub unimport {
shift;
- $^H &= ~ bits(@_ ? @_ : qw(status exit time hushed));
+ $^H &= ~ bits(@_ ? @_ : qw(status time hushed));
+ my $sememe;
+
+ foreach $sememe (@_ ? @_ : qw(exit)) {
+ $^H{'vmsish_exit'} = 0 if $sememe eq 'exit';
+ }
}
1;
#define COMPLEX_STATUS 1 /* We track both "POSIX" and VMS values */
#define HINT_V_VMSISH 24
-#define HINT_M_VMSISH_HUSHED 0x10000000 /* turn off message on error exit*/
-#define HINT_M_VMSISH_STATUS 0x20000000 /* system, $? return VMS status */
-#define HINT_M_VMSISH_EXIT 0x40000000 /* exit(1) ==> SS$_NORMAL */
+#define HINT_M_VMSISH_HUSHED 0x20000000 /* stifle error msgs on exit */
+#define HINT_M_VMSISH_STATUS 0x40000000 /* system, $? return VMS status */
#define HINT_M_VMSISH_TIME 0x80000000 /* times are local, not UTC */
#define NATIVE_HINTS (PL_hints >> HINT_V_VMSISH) /* used in op.c */