Hello,

I am working on multi-platform Perl scripts for VMS & NT.

The NT Perl does not have some files, such as vmsish.pl. I have figured out
that I can create a BEGIN block that checks $^O for VMS and does a
"require vmsish.pm; vmsish::import( 'vmsish', 'exit', 'status');".
This way I don't get the "vmsish.pm not found" message from the "use vmsish".

When I had the "require ..." in the regular main line code, such as:
    if( $^O eq 'VMS') {
        require vmsish; vmsish::import( 'vmsish', 'exit', 'status');
        $EXIT_SUCCESS = 1;              # ok
        $EXIT_BADPARAM = 20;            # invalid parameter
    }
    else {
        $EXIT_SUCCESS = 0;
        $EXIT_BADPARAM = 1;
    }
the vmsish code is evidently brought into the block's name space and does
not work outside of the block. An "exit($EXIT_SUCCESS)" gives the VMS
message "%SYSTEM-F-ABORT, abort".

Is there a way to import a module within a block and have the imported
entities be in anothe name space, such as the main:: name space?

Thank you very much,  Ed


Ed James                           [EMAIL PROTECTED]
TeleCommunications Systems, Inc.   voice 410-295-1919
275 West Street, Suite 400         fax   410-280-1094
Annapolis, MD 21401-1740

Reply via email to