Seth Woolley's Man Viewer

vmsish(3) - vmsish - Perl pragma to control VMS-specific language features - man 3 vmsish

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

vmsish(3)              Perl Programmers Reference Guide              vmsish(3)



NAME
       vmsish - Perl pragma to control VMS-specific language features

SYNOPSIS
           use vmsish;

           use vmsish 'status';        # or '$?'
           use vmsish 'exit(3,n,1 builtins)';
           use vmsish 'time(1,2,n)';

           use vmsish 'hushed';
           no vmsish 'hushed';
           vmsish::hushed($hush);

           use vmsish;
           no vmsish 'time(1,2,n)';

DESCRIPTION
       If no import list is supplied, all possible VMS-specific features are
       assumed.  Currently, there are four VMS-specific features available:
       'status' (a.k.a '$?'), 'exit(3,n,1 builtins)', 'time(1,2,n)' and 'hushed'.

       If you're not running VMS, this module does nothing.

       "vmsish status"
             This makes $? and "system" return the native VMS exit(3,n,1 builtins) status
             instead of emulating the POSIX exit(3,n,1 builtins) status.

       "vmsish exit(3,n,1 builtins)"
             This makes "exit(3,n,1 builtins) 1" produce a successful exit(3,n,1 builtins) (with status
             SS$_NORMAL), instead of emulating UNIX exit(3,n,1 builtins)(), which considers
             "exit(3,n,1 builtins) 1" to indicate an error.  As with the CRTL's exit(3,n,1 builtins)() func-
             tion, "exit(3,n,1 builtins) 0" is also mapped to an exit(3,n,1 builtins) status of SS$_NORMAL,
             and any other argument to exit(3,n,1 builtins)() is used directly as Perl's exit(3,n,1 builtins)
             status.

       "vmsish time(1,2,n)"
             This makes all times relative to the local time(1,2,n) zone, instead of
             the default of Universal Time (a.k.a Greenwich Mean Time, or
             GMT).

       "vmsish hushed"
             This suppresses printing of VMS status messages to SYS$OUTPUT and
             SYS$ERROR if(3,n) Perl terminates with an error(8,n) status.  and allows
             programs that are expecting "unix-style" Perl to avoid having to
             parse VMS error(8,n) messages.  It does not supress any messages from
             Perl itself, just the messages generated by DCL after Perl exits.
             The DCL symbol $STATUS will still have the termination status,
             but with a high-order bit set:

             EXAMPLE:
                 $ perl -e"exit(3,n,1 builtins) 44;"                             Non-hushed
             error(8,n) exit(3,n,1 builtins)
                 %SYSTEM-F-ABORT, abort(3,7)                          DCL message
                 $ show sym $STATUS
                   $STATUS == "%X0000002C"

                 $ perl -e"use vmsish qw(hushed); exit(3,n,1 builtins) 44;"      Hushed error(8,n) exit(3,n,1 builtins)
                 $ show sym $STATUS
                   $STATUS == "%X1000002C"

             The 'hushed' flag has a global scope during compilation: the
             exit(3,n,1 builtins)() or die() commands that are compiled after 'vmsish hushed'
             will be hushed when they are executed.  Doing a "no vmsish
             'hushed'" turns off the hushed flag.

             The status of the hushed flag also affects output of VMS error(8,n)
             messages from compilation errors.   Again, you still get the Perl
             error(8,n) message (and the code in(1,8) $STATUS)

             EXAMPLE:
                 use vmsish 'hushed';    # turn on hushed flag
                 use Carp;          # Carp compiled hushed
                 exit(3,n,1 builtins) 44;           # will be hushed
                 croak('I die');    # will be hushed
                 no vmsish 'hushed';     # turn off hushed flag
                 exit(3,n,1 builtins) 44;           # will not be hushed
                 croak('I die2'):   # WILL be hushed, croak was compiled
             hushed

             You can also control the 'hushed' flag at run-time, using the
             built-in routine vmsish::hushed().  Without argument, it returns
             the hushed status.  Since vmsish::hushed is built-in, you do not
             need to "use vmsish" to call it.

             EXAMPLE:
                 if(3,n) ($quiet_exit) {
                     vmsish::hushed(1);
                 }
                 print "Sssshhhh...I'm hushed...\n" if(3,n) vmsish::hushed();
                 exit(3,n,1 builtins) 44;

             Note that an exit(3,n,1 builtins)() or die() that is compiled 'hushed' because of
             "use vmsish" is not un-hushed by calling vmsish::hushed(0) at
             runtime.

             The messages from error(8,n) exits from inside the Perl core are gen-
             erally more serious, and are not supressed.

       See "Pragmatic Modules" in(1,8) perlmod.



perl v5.8.5                       2001-09-21                         vmsish(3)

References for this manual (incoming links)