On every blead perl I have seen, the following bug is present on VMS and
is causing the script t/op/magic.t to fail at test 7.
In the Perl debugger, before running any script if you issue the command
'x keys(%ENV), the entry for index 0, also shows up as index 1.
DB<1> x keys(%ENV)
0 'SYS$TIMEZONE_DAYLIGHT_SAVING'
1 'SYS$TIMEZONE_DAYLIGHT_SAVING'
2 'CDE$DETACHED_LOGICALS'
3 'MOP$NAMED_LOAD'
4 'BUILD_ROOT'
On all subsequent calls, you get the expected results:
DB<2> x keys(%ENV)
0 'SYS$TIMEZONE_DAYLIGHT_SAVING'
1 'CDE$DETACHED_LOGICALS'
2 'MOP$NAMED_LOAD'
3 'BUILD_ROOT'
4 'SMBSRVSHR_TV'
http://perldoc.perl.org/functions/keys.html also seems to not agree with
the way that keys() is currently working:
"As a side effect, calling keys() resets the HASH's internal iterator,
see each. (In particular, calling keys() in void context resets the
iterator with no other overhead.)"
DB <8> x keys()
Not enough arguments for keys at (eval 13)[../lib/perl5db.pl:628] line
2, near "keys()"
values() seems to work the same way as keys(). The first call of
values(%ENV) in a program returns a list with he values repeated twice,
subsequent calls are correct.
DB<1> x each (%ENV)
0 'SYS$TIMEZONE_DAYLIGHT_SAVING'
1 1
DB<2>
x each (%ENV)
0 'SYS$TIMEZONE_DAYLIGHT_SAVING'
1 1
DB<3>
x each (%ENV)
0 'CDE$DETACHED_LOGICALS'
1 'DECW$DISPLAY,LANG'
-John
[EMAIL PROTECTED]
Personal Opinion Only