Front page | perl.perl5.porters |
Postings from March 2000
[ID 20000307.008] each on hash-in-place loops infinitely
Thread Next
From:
peter
Date:
March 7, 2000 17:58
Subject:
[ID 20000307.008] each on hash-in-place loops infinitely
Message ID:
200003071757.RAA31498@clm.jetcafe.org
This is a bug report for perl from peter@psdt.com,
generated with the help of perlbug 1.27 running under perl v5.5.650.
-----------------------------------------------------------------
[Please enter your report here]
If keys and values work okay on a hash defined with a block as the
variable name, one might expect each() to also. Instead it gets
into an infinite loop (it prints a different pair on Solaris 5.005_03,
FWIW).
use strict;
print keys %{{abc => 123, def => 456, ghi => 789}};
print values %{{abc => 123, def => 456, ghi => 789}};
while (my ($k, $v) = each %{{abc => 123, def => 456, ghi => 789}}) {
print "$k $v\n";
}
abcdefghi123456789abc 123
abc 123
abc 123
[major snippage]
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Site configuration information for perl v5.5.650:
Configured by peter at Wed Feb 23 18:40:32 2000.
Summary of my perl5 (revision 5.0 version 5 subversion 650) configuration:
Platform:
osname=linux, osvers=2.0.36, archname=i586-linux
uname='linux clm.jetcafe.org 2.0.36 #1 tue oct 13 22:17:11 edt 1998 i586 unknown '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usesocks=undef useperlio=undef d_sfio=undef
use64bits=undef uselargefiles=define usemultiplicity=undef
Compiler:
cc='gcc', optimize='-O2', gccversion=2.7.2.3
cppflags='-Dbool=char -DHAS_BOOL'
ccflags ='-Dbool=char -DHAS_BOOL'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=/lib/libc-2.0.7.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.5.650:
/home/peter/perl/lib/5.5.650/i586-linux
/home/peter/perl/lib/5.5.650
/home/peter/perl/lib/site_perl/5.5.650/i586-linux
/home/peter/perl/lib/site_perl/5.5.650
/home/peter/perl/lib/site_perl
.
---
Environment for perl v5.5.650:
HOME=/home/peter
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin
PERL_BADLANG (unset)
SHELL=/bin/tcsh
Thread Next
-
[ID 20000307.008] each on hash-in-place loops infinitely
by peter