I'm a lot more comfortable with this interface. Thanks for the suggestions.
To Do: Add code to accept permissions when creating a table. Fill in some missing documentation. Maybe add a simple translation routine that accepts a logical name and returns strings. Any other ideas? Ok, here's the new interface. NAME VMS::Logical - OpenVMS Logical name interface SYNOPSIS use VMS::Logical qw(translate define deassign create_table); $hashref = translate({lognam='sys$sysdevice', case_blind=>1}); $table = create_table({table=>'test_table', partab=>'LNM$PROCESS_DIRECTORY'}); $table = define({lognam=>'TEST_LOGICAL', tabnam=>'LNM$JOB', acmode=>'SUPERVISOR', equiv->[{string=>'equivalence'}, {string=>'another'}]}); $status = deassign({lognam=>'TEST_LOGICAL', tabnam=>'LNM$JOB', acmode=>'SUPERVISOR'}); DESCRIPTION VMS::Logical provides access to logical names on OpenVMS systems. translate Translates a logical name. $hash = VMS::Logical::translate('logical_name'); $hash = VMS::Logical::translate({option=>value}); The first form can be used for a simple logical name translation using default search options. The second form should be used if additional options are necessary. If the translation is successful, a hash reference will be returned containing information about the logical name. "undef" is returned on errors. The VMS error code will be available in $^E. The options hash may contain the following values. lognam The logical name to translate. case_blind When set to 1, case will be ignored when searching for the logical name. interlocked When set to 1, waits for cluster operations to complete before proceeding. table Specifies the name of the table to be searched for the logical name. acmode Access mode to use for searching. The value should be one of USER, SUPERVISOR, EXECUTIVE or KERNEL. Any abbrevation of these is accepted. If specified, only logical names at the specified mode or a more privileged mode will be returned. define Defines a logical name. $table = VMS::Logical::define({option=>value}); The name of the table where the logical name was created is returned if the call is successful. On error, "undef" is returned and the VMS status code is available in $^E. The options hash may contain the following values. table The name of the table to contain the logical name. lognam The name of the logical to be defined. acmode The access mode of the logical name. attr Attributes for the logical name. This is a hashref containing the following options. CONFINE Logical will not be copied to subprocesses when spawning. NO_ALIAS Don't allow duplicate logical names at outer levels. equiv An array of equivalence definitions. Each equivalence is a hashref containing the following items. attr Attributes for the equivalence. The following attributes are supported. CONCEALED Create a concealed logical. TERMINAL The equivalence contains no logical names. string The equivalence string. deassign Deletes a logical name. $status = VMS::Logical::deassign({option=>value}); Returns a true value if successful. On error, "undef" is returned and the VMS error code is available in $^E. The options hash may contain the following values. table Name of the table containing the logical. lognam The name of the logical to delete. acmode The access mode of the logical name. create_table Creates a logical name table. $table = create_table({option=value}); The name of the created table is returned if successful. On error, "undef" is returned and the VMS error code is available in $^E. Valid options are as follows. table The name of the table to create. partab The name of the parent table. quota The number of bytes of system space that can be used by the table and logicals defined in it. acmode The access mode of the table. attr Attributes of the table. NO_ALIAS Don't allow tables to be created with the same name at outer access modes. CREATE_IF CONFINE SEE ALSO 'HP OpenVMS Programming Concepts Manual' contains a chapter about logical names and logical name tables. 'HP OpenVMS System Services Reference Manual' provides detailed information about the OpenVMS logical name system services. AUTHOR Thomas Pfau, < [EMAIL PROTECTED] > COPYRIGHT AND LICENSE Copyright (C) 2008 by Thomas Pfau This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.