develooper Front page | perl.perl5.porters | Postings from April 2003

[perl #21875] Hash ref transformed as a list

Thread Next
pierre denis
April 7, 2003 13:02
[perl #21875] Hash ref transformed as a list
Message ID:
# New Ticket Created by  pierre denis 
# Please include the string:  [perl #21875]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.34 running under perl v5.8.0.

[Please enter your report here]

## Demonstrate a bug in perl 5.8 when the first key of a hash ref
## starts with the letter 'q' unquoted
## Pierre Denis (
## Fotango

use Data::Dumper;

print "isList() => Should return a hash ref, but returns a list ".Dumper(isList());
print "stillList() => Should return a hash ref, but returns a list ".Dumper(stillList());
print "isHashRef() => Does return a hash ref ".Dumper(isHashRef());

sub isList {
    q => undef,
    foo => 'bar',

sub isHashRef {
    'q' => undef,
    foo => 'bar',

sub stillList {
    quality => 'bad',
    foo => 'bar',

[Please do not change anything below this line]
This perlbug was built using Perl v5.8.0 - Mon Jun 24 13:38:29 BST 2002
It is being executed now by  Perl v5.8.0 - Mon Jan  6 16:53:13 GMT 2003.

Site configuration information for perl v5.8.0:

Configured by sadlem at Mon Jan  6 16:53:13 GMT 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
    osname=linux, osvers=2.4.18, archname=i686-linux
    uname='linux medusa 2.4.18 #2 smp fri may 31 23:12:36 bst 2002 i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    cppflags='-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.3 2.96-112)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldl -lm -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
    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.8.0:

Environment for perl v5.8.0:
    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