Front page | perl.perl5.porters |
Postings from April 2012
[perl #112204] result of assigning a list with duplicate keys to a hash not documented
Thread Previous
From:
l . mai @ web . de
Date:
April 2, 2012 10:37
Subject:
[perl #112204] result of assigning a list with duplicate keys to a hash not documented
Message ID:
rt-3.6.HEAD-4610-1333388219-110.112204-75-0@perl.org
# New Ticket Created by l.mai@web.de
# Please include the string: [perl #112204]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112204 >
This is a bug report for perl from l.mai@web.de,
generated with the help of perlbug 1.39 running under perl 5.14.2.
-----------------------------------------------------------------
[Please describe your issue here]
I know that when you assign a list to hash and that list has duplicate keys,
the last one wins:
%h = (a => 1, a => 2); # %h = (a => 2);
But I don't see this mentioned in the documentation. I'd've expected it in
perldata.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=docs
severity=medium
---
This perlbug was built using Perl 5.12.1 - Thu Jun 3 20:09:15 CEST 2010
It is being executed now by Perl 5.14.2 - Wed Mar 14 07:43:56 CET 2012.
Site configuration information for perl 5.14.2:
Configured by mauke at Wed Mar 14 07:43:56 CET 2012.
Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
Platform:
osname=linux, osvers=2.6.38-gentoo-r6, archname=i686-linux
uname='linux nora 2.6.38-gentoo-r6 #1 preempt sat aug 6 03:05:34 cest 2011 i686 amd athlon(tm) 64 processor 3200+ authenticamd gnulinux '
config_args=''
hint=previous, useposix=true, d_sigaction=define
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='cgcc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -march=native -flto',
cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccversion='', gccversion='4.6.3', 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='cgcc', ldflags ='-fstack-protector -L/usr/local/lib -O2 -flto'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.12.2.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.13'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -march=native -L/usr/local/lib -fstack-protector -flto'
Locally applied patches:
SAVEARGV0 - disable magic open in <ARGV>
---
@INC for perl 5.14.2:
/home/mauke/usr/local/lib/perl5/site_perl/5.14.2/i686-linux
/home/mauke/usr/local/lib/perl5/site_perl/5.14.2
/home/mauke/usr/local/lib/perl5/5.14.2/i686-linux
/home/mauke/usr/local/lib/perl5/5.14.2
/home/mauke/usr/local/lib/perl5/site_perl/5.14.1/i686-linux
/home/mauke/usr/local/lib/perl5/site_perl/5.14.1
/home/mauke/usr/local/lib/perl5/site_perl/5.14.0/i686-linux
/home/mauke/usr/local/lib/perl5/site_perl/5.14.0
/home/mauke/usr/local/lib/perl5/site_perl
.
---
Environment for perl 5.14.2:
HOME=/home/mauke
LANG=en_US.UTF-8
LANGUAGE (unset)
LC_COLLATE=POSIX
LD_LIBRARY_PATH=/home/mauke/usr/local/lib
LOGDIR (unset)
PATH=/home/mauke/usr/perlbrew/bin:/home/mauke/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.4.5:/opt/sun-jdk-1.4.2.13/bin:/opt/sun-jdk-1.4.2.13/jre/bin:/opt/sun-jdk-1.4.2.13/jre/javaws:/opt/dmd/bin:/usr/games/bin
PERLBREW_HOME=/home/mauke/.perlbrew
PERLBREW_PATH=/home/mauke/usr/perlbrew/bin
PERLBREW_ROOT=/home/mauke/usr/perlbrew
PERLBREW_VERSION=0.27
PERL_BADLANG (unset)
PERL_UNICODE=SAL
SHELL=/bin/bash
Thread Previous