Front page | perl.perl5.porters |
Postings from March 2007
[perl #41663] inconsistent promotion of undef to hashref
Thread Next
From:
David Nicol
Date:
March 2, 2007 16:22
Subject:
[perl #41663] inconsistent promotion of undef to hashref
Message ID:
rt-3.6.HEAD-2051-1172857045-1637.41663-75-0@perl.org
# New Ticket Created by David Nicol
# Please include the string: [perl #41663]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41663 >
This is a bug report for perl from root@pony.mindtrust,
generated with the help of perlbug 1.35 running under perl v5.8.7.
-----------------------------------------------------------------
[Please enter your report here]
# perl -wle '$x=undef; $x->{foo}=4; print $x->{foo}'
4
# perl -wle '$y=undef; ($x=$y)->{foo}=4; print $x->{foo}'
Can't use an undefined value as a HASH reference at -e line 1.
I want the second one to work as the first.
Ignorant guesses as to what is happening have been suppressed :)
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl v5.8.7:
Configured by root at Tue Nov 29 12:27:46 CST 2005.
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
Platform:
osname=netbsd, osvers=2.0.2, archname=i386-netbsd-thread-multi
uname='netbsd pony.mindtrust 2.0.2 netbsd 2.0.2 (generic.mp) #0: wed mar 23 09:10:48 utc 2005 jmc@faith.netbsd.org:homebuildsabnetbsd-2-0-2-releasei386200503220140z-objhomebuildsabnetbsd-2-0-2-releasesrcsysarchi386compilegeneric.mp i386 '
config_args='-sde -Darchname=i386-netbsd -Dcc=cc -Doptimize=-O2 -pthread -I/usr/include -Duseshrplib -Ui_malloc -Uusemymalloc -Uinstallusrbinperl -Dinstallstyle=lib/perl5 -Dprefix=/usr/pkg -Dsiteprefix=/usr/pkg -Dvendorprefix=/usr/pkg -Dscriptdir=/usr/pkg/lib/perl5/bin -Dsitescript=/usr/pkg/lib/perl5/site_perl/bin -Dvendorscript=/usr/pkg/lib/perl5/vendor_perl/bin -Dprivlib=/usr/pkg/lib/perl5/5.8.0 -Dsitelib=/usr/pkg/lib/perl5/site_perl/5.8.0 -Dvendorlib=/usr/pkg/lib/perl5/vendor_perl/5.8.0 -Dman1ext=1 -Dman1dir=/usr/pkg/lib/perl5/man/man1 -Dsiteman1dir=/usr/pkg/lib/perl5/site_perl/man/man1 -Dvendorman1dir=/usr/pkg/lib/perl5/vendor_perl/man/man1 -Dman3ext=3 -Dman3dir=/usr/pkg/lib/perl5/man/man3 -Dsiteman3dir=/usr/pkg/lib/perl5/site_perl/man/man3 -Dvendorman3dir=/usr/pkg/lib/perl5/vendor_perl/man/man3 -Daphostname=/bin/hostname -Dln=/bin/ln -Dsed=/usr/bin/sed -Dissymlink=test -h -Duseithreads -Dlibswanted=m crypt '
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/pkg/include',
optimize='-O2 -pthread -I/usr/include',
cppflags='-fno-strict-aliasing -pipe -I/usr/pkg/include'
ccversion='', gccversion='3.3.3 (NetBSD nb3 20040520)', 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='cc', ldflags =' -Wl,-R/usr/pkg/lib -pthread -L/usr/pkg/lib'
libpth=/usr/pkg/lib /usr/lib
libs=-lm -lcrypt -lpthread
perllibs=-lm -lcrypt -lpthread
libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-R/usr/pkg/lib/perl5/5.8.0/i386-netbsd-thread-multi/CORE'
cccdlflags='-DPIC -fPIC ', lddlflags=' -Wl,-R/usr/pkg/lib -pthread --whole-archive -shared -L/usr/pkg/lib'
Locally applied patches:
---
@INC for perl v5.8.7:
/usr/pkg/lib/perl5/site_perl/5.8.0/i386-netbsd-thread-multi
/usr/pkg/lib/perl5/site_perl/5.8.0
/usr/pkg/lib/perl5/site_perl/5.8.0
/usr/pkg/lib/perl5/vendor_perl/5.8.0/i386-netbsd-thread-multi
/usr/pkg/lib/perl5/vendor_perl/5.8.0
/usr/pkg/lib/perl5/vendor_perl/5.8.0
/usr/pkg/lib/perl5/5.8.0/i386-netbsd-thread-multi
/usr/pkg/lib/perl5/5.8.0
.
---
Environment for perl v5.8.7:
HOME=/root
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
PERL_BADLANG (unset)
SHELL=/bin/ksh
Thread Next
-
[perl #41663] inconsistent promotion of undef to hashref
by David Nicol