At 8:11 PM -0600 2/24/04, Sheldon E. Smith wrote:
>So, at least as long as the first element of "PERL_ENV_TABLES" is
>"CLISYM_foo", any table(s) that follow is(are) read-only. Anything
>defined into the ENV hash becomes a DCL symbol (local or global
>depending) in the current process only.
>Q: Does anyone know what happens if the first element is neither
>CLISYM_GLOBAL or CLISYM_LOCAL?

The documentation spells it out pretty well.  Holler if there's
something unclear:

http://www.perldoc.com/perl5.8.0/pod/perlvms.html#Perl-variables


>There is no immediately *apparent* reason why the LNM$PROCESS table name
>could not be replaced with LNM$FILE_DEV, at least for *your* system.
>Given how (most) VMS users expect logical name translation to happen, I
>would expect it could be changed to LNM$FILE_DEV worldwide.
>Q: Does anyone have (very) old sources? Is the use of LNM$PROCESS
>perhaps simply an artifact of some much older version of the code?
>(...we've always done it that way...) Perhaps it made sense to do it
>that way back in, oh, Perl 4?

I don't think there was ever a version of Perl 4 that ran on VMS.

LNM$FILE_DEV is the default when PERL_ENV_TABLES is not specified.
Restricting Perl's %ENV to not look beyond LNM$PROCESS might well be
considered an extra security feature; a CGI script, for example, that
does something with a file on the server can't be made to do that
something to SYS$SYSTEM:SYSUAF.DAT because SYS$SYSTEM is  in the
system table.  After defining PERL_ENV_TABLES to see only
LNM$PROCESS, Perl can't see anything in the system table (or any
other table except LNM$PROCESS):

$ perl -e "print $ENV{'SYS$SYSTEM'};"
SYS$SYSROOT:[SYSEXE]
$ define PERL_ENV_TABLES LNM$PROCESS
$ perl -e "print $ENV{'SYS$SYSTEM'};"
$


>------ Jeremy Begg said:
>> Hi Sheldon
>>
>>>The first question is, what else is the CRTL_ENV table used for?


It's not, strictly speaking, a logical name table.  See the docs
above for how Perl on VMS uses it, and see the CRTL documentation on
getenv() for how the CRTL uses it.


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

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

Reply via email to