Hi Sheldon

>The first question is, what else is the CRTL_ENV table used for?

Actually I've just re-checked PERL_ENV_TABLES here and it's not what I said
it was :-(   The current value is (and has been for some time) ...

   "PERL_ENV_TABLES" = "CLISYM_GLOBAL" (LNM$SYSTEM_TABLE)
        = "LNM$PROCESS"

PERL_ENV_TABLES is read once, during Perl initialisation, and specifies how
the %ENV array is to be populated.  It also determines what happens if the
Perl program adds or changes an element in the %ENV array.

"CLISYM_GLOBAL" means search the process' DCL symbols (local then global),
and because this is the first entry in the PERL_ENV_TABLES array, any
changes to %ENV will be made to the corresponding DCL global symbol (and I
assume one will be created if the original %ENV element came from a logical
name, or didn't exist).

"CLISYM_LOCAL" is the same as "CLISYM_GLOBAL" except that changes to the
%ENV array will result in new or modified DCL local symbols (not global
symbols).

"CRTL_ENV" (if it was present) refers to the the CRTL's internal environment
variable array, which is documented in the C RTL Reference manual (see
getenv()).

Any other value is interpreted as a logical name table name, hence
"LNM$PROCESS" on my system means to search the process-specific logical name
table.

Regards,

        Jeremy Begg

  +---------------------------------------------------------+
  |            VSM Software Services Pty. Ltd.              |
  |                 http://www.vsm.com.au/                  |
  |       "OpenVMS Systems Management & Programming"        |
  |---------------------------------------------------------|
  | P.O.Box 402, Walkerville, |  E-Mail:  [EMAIL PROTECTED] |
  | South Australia 5081      |   Phone:  +61 8 8221 5188   |
  |---------------------------|  Mobile:  0414 422 947      |
  |  A.C.N. 068 409 156       |     FAX:  +61 8 8221 7199   |
  +---------------------------------------------------------+

>-----Original Message-----
>From: Jeremy Begg [mailto:[EMAIL PROTECTED]
>Sent: Monday, February 23, 2004 11:37 PM
>To: Craig A. Berry
>Cc: Jeremy Begg; [EMAIL PROTECTED]
>Subject: RE: Using %ENV array to get system logical names

>Hi,

>>>Mark has provided the answer (and the cause).
>>
>>Do tell.  %ENV is definitely capable of using LNM$FILE_DEV, but
>>whatever problem you ran into might well trip up someone else.

>The issue was that PERL_ENV_TABLES is currently defined /SYSTEM to be
>CRTL_ENV,LNM$PROCESS on my server.  Mark set it up that way for reasons
>which escape us both at the moment :-)  I'm tempted to simply DEASSIGN
>the PERL_ENV_TABLES logical to fix my problem, but first I have to work
>out what this might break,

>Regards,

>       Jeremy Begg


>>>>-----Original Message-----
>>>>From: Jeremy Begg [mailto:[EMAIL PROTECTED]
>>>>Sent: Monday, February 23, 2004 5:07 PM
>>>>To: [EMAIL PROTECTED]
>>>>Cc: [EMAIL PROTECTED]
>>>>Subject: Using %ENV array to get system logical names
>>>
>>>
>>>>Hi,
>>>
>>>>I'm reworking a Perl script for use with the WASD webserver and have
>>>>run into a small problem.  I need the script to be able to check for
>>>>the presence of a specific logical name and use its value if it
>>>>exists.  If the logical name doesn't exist, the program should use a
>default value.
>>>
>>>>Unfortunately, I'm finding $ENV{name} appears to be undefined if
>>>>'name' is a logical name.  It only seems to find logical names
>>>>defined in the LNM$PROCESS logical name table.
>>>
>>>>What do I need to do to get $ENV{} to search all logical name tables
>>>>defined
>>> >by LNM$FILE_DEV (the usual default logical name table search list)?



>>--
>>________________________________________
>>Craig A. Berry
>>mailto:[EMAIL PROTECTED]

>>"... getting out of a sonnet is much more  difficult than getting in."
>>                 Brad Leithauser

Reply via email to