Front page | perl.perl5.porters |
Postings from April 2003
[perl #21875] Hash ref transformed as a list
Thread Next
From:
pierre denis
Date:
April 7, 2003 13:02
Subject:
[perl #21875] Hash ref transformed as a list
Message ID:
rt-21875-54626.5.53772579393765@bugs6.perl.org
# New Ticket Created by pierre denis
# Please include the string: [perl #21875]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=21875 >
This is a bug report for perl from pdenis@fotango.com,
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 (pdenis@fotango.com)
## 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]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
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:
Platform:
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 '
config_args=''
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
Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2',
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/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.2.5'
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:
/usr/local/lib/perl5/5.8.0/i686-linux
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl
.
---
Environment for perl v5.8.0:
HOME=/root
LANG=en_GB.iso885915
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin:/home/pierre/bin
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Next
-
[perl #21875] Hash ref transformed as a list
by pierre denis