Document %ENV = () portability issues.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 6 Nov 2000 22:41:41 +0000 (22:41 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 6 Nov 2000 22:41:41 +0000 (22:41 +0000)
p4raw-id: //depot/perl@7580

pod/perlport.pod
vms/perlvms.pod

index d1887bf..a06da44 100644 (file)
@@ -334,7 +334,10 @@ operating systems put mandatory locks on such files.
 
 Don't count on a specific environment variable existing in C<%ENV>.
 Don't count on C<%ENV> entries being case-sensitive, or even
-case-preserving.
+case-preserving.  Don't try to clear %ENV by saying C<%ENV = ();>, or,
+if you really have to, make it conditional on C<$^O ne 'vms'> since in
+VMS the C<%ENV> table is much more than a per-process key-value string
+table.
 
 Don't count on signals or C<%SIG> for anything.
 
index 17e83e5..25058bc 100644 (file)
@@ -788,6 +788,12 @@ by saying
 (You can't just say C<$ENV{$key} = $ENV{$key}>, since the
 Perl optimizer is smart enough to elide the expression.)
 
+Don't try to clear C<%ENV> by saying C<%ENV = ();> Bad things will
+happen because parts of C<%ENV> are per-process, parts of it are
+per-group, and parts of it are system-wide.  Without some serious
+rights, it won't work, or with the rights, it does, but the system
+will effectively die.
+
 At present, the first time you iterate over %ENV using
 C<keys>, or C<values>,  you will incur a time penalty as all
 logical names are read, in order to fully populate %ENV.