Rafael Garcia-Suarez wrote:
John E. Malmberg wrote:
The dump of [EMAIL PROTECTED] on VMS produces the following output that
is different from the expected.
In particular, there is no trailing null on the value on the resulting
value, and it has the additional flags of "READONLY" and "FAKE".
What I do not know is if this is an intended behavior on VMS as a side
effect of creating or modifying $ENV{PATH}.
As far as I can tell from a quick glance, the \0 absence is a bug, but
harmless since perl doesn't use a trailing \0 to mark end of strings
internally ; and the FAKE/READONLY flags are ok, due to the way %ENV is
handled on VMS.
Actually VMS does not use a trailing NULL on two of the items, DCL
symbols and logical name, that are accessible through the $ENV hash.
Both of those store the data as counted strings, and it is legal for
those strings to contain embedded NULLs and other binary values.
Not usually done because it is not trivial to put those embedded NULLs
in from the command line, and also some programs written in C may not be
able to deal with the result. Perl might be one of them, I would have
to check the source again.
I can submit a patch in about 10 hours for this test to make conditional
the pattern for the READONLY,FAKE, and trailing NULL being optional.
I would rather not change Perl on VMS to pretend that logical names and
symbols have a trailing NULL. While it would probably be harmless, it
is possible that could have some strange side effects on VMS specific
Perl scripts.
-John
[EMAIL PROTECTED]
Personal Opinion Only