develooper Front page | perl.perl5.porters | Postings from March 2000

[ID 20000307.008] each on hash-in-place loops infinitely

Thread Next
March 7, 2000 17:58
[ID 20000307.008] each on hash-in-place loops infinitely
Message ID:

This is a bug report for perl from,
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,

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:
    osname=linux, osvers=2.0.36, archname=i586-linux
    uname='linux 2.0.36 #1 tue oct 13 22:17:11 edt 1998 i586 unknown '
    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
    cc='gcc', optimize='-O2', gccversion=
    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/, 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:

Environment for perl v5.5.650:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About