diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-19 05:55:52 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-19 05:55:52 +0000 |
commit | d98f61e7d51abbefcd3982d605d4bd09ed4ddd7f (patch) | |
tree | 0fe4b7cb5a932e8e59433ecae8bcc077da072ed3 /vms/ext/vmsish.pm | |
parent | 71a29c3c6e68e84b4c2fa366c4878918712829a9 (diff) | |
download | perl-d98f61e7d51abbefcd3982d605d4bd09ed4ddd7f.tar.gz |
support for C<use vmsish 'hushed'>; move VMSISH_EXIT out of
op_private (from Charles Lane <lane@DUPHY4.Physics.Drexel.Edu>)
p4raw-id: //depot/perl@5816
Diffstat (limited to 'vms/ext/vmsish.pm')
-rw-r--r-- | vms/ext/vmsish.pm | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/vms/ext/vmsish.pm b/vms/ext/vmsish.pm index dfb565b326..2fc48530c0 100644 --- a/vms/ext/vmsish.pm +++ b/vms/ext/vmsish.pm @@ -11,6 +11,7 @@ vmsish - Perl pragma to control VMS-specific language features use vmsish 'status'; # or '$?' use vmsish 'exit'; use vmsish 'time'; + use vmsish 'hushed'; use vmsish; no vmsish 'time'; @@ -18,8 +19,8 @@ vmsish - Perl pragma to control VMS-specific language features =head1 DESCRIPTION If no import list is supplied, all possible VMS-specific features are -assumed. Currently, there are three VMS-specific features available: -'status' (a.k.a '$?'), 'exit', and 'time'. +assumed. Currently, there are four VMS-specific features available: +'status' (a.k.a '$?'), 'exit', 'time' and 'hushed'. =over 6 @@ -41,6 +42,16 @@ used directly as Perl's exit status. This makes all times relative to the local time zone, instead of the default of Universal Time (a.k.a Greenwich Mean Time, or GMT). +=item C<vmsish hushed> + +This supresses printing of VMS status messages to SYS$OUTPUT and SYS$ERROR +if Perl terminates with an error status. This primarily effects error +exits from things like compiler errors or "standard Perl" runtime errors, +where text error messages are also generated by Perl. + +The error exits from inside VMS.C are generally more serious, and are +not supressed. + =back See L<perlmod/Pragmatic Modules>. @@ -56,8 +67,8 @@ sub bits { my $bits = 0; my $sememe; foreach $sememe (@_) { - $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; @@ -65,12 +76,22 @@ sub bits { sub import { shift; - $^H |= bits(@_ ? @_ : qw(status exit time)); + $^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)); + $^H &= ~ bits(@_ ? @_ : qw(status time hushed)); + my $sememe; + + foreach $sememe (@_ ? @_ : qw(exit)) { + $^H{'vmsish_exit'} = 0 if $sememe eq 'exit'; + } } 1; |