views:

17

answers:

0

VMS style command line user interface messages have standard format. For example:

$ PRINT SOMEFILE.DAT

%PRINT-E-OPENIN, error opening DKA2:[MYDIR]SOMEFILE.DAT; as input
-RMS-E-FNF, file not found
  • Component name: PRINT, RMS.
  • Severity level: Success, Information, Warning, Error, and Fatal.
  • Message identifier: OPENIN, FNF.
  • Message text: "error opening...", "file not found".

Is there a Perl module that will emulate this?

For example:

use VMSlike;
VMSsetApp('MYAPP');
VMSinfo('START', "Starting it.");
something ||
   VMSdie("End of the world.");

would produce:

%MYAPP-I-START, Starting it.
%MYAPP-F-FATAL, End of the world.

related questions