Front page | perl.perl5.porters |
Postings from April 2001
[ID 20010425.007] hash key; pseudohashes
Thread Next
From:
Hans Ginzel
Date:
April 25, 2001 13:49
Subject:
[ID 20010425.007] hash key; pseudohashes
Message ID:
E14sN0y-0000XU-00@geze
This is a bug report for perl from hans@kolej.mff.cuni.cz,
generated with the help of perlbug 1.28 running under perl v5.6.0.
-----------------------------------------------------------------
[Please enter your report here]
Dear perl team,
I have two things. In a perl version 5.? was a deccision to understand
bareword in hash key ($hash{bareword}) as a string. I geeted this. But
while not to do the same if using hash like array -- if there are a list of
keys, e.g.
$STAT{dev} = 1; # thats OK
# dots means shortcuting here and has nothing with perl
@STAT{dev, ino, mode, nlink,...} = (1, 2, 3, 4,...);
These could be strings from barewords in the same way
as "dev" on the first line is.
My second problem is similar. I also want to assign to more hash entries
as to an array. But to pseudohash, e.g.
@st{uid, gid} = (500, 500); # OK, clasical hash, but should write ""
$stat = [\%STAT]; # pseudo-hash
$stat->{uid, gid} = (500, 500); # line 8
Results:
:! perl-5.005 /home/hans/Perl/stat.pl
No such array field at /home/hans/Perl/stat.pl line 8.
:! perl-5.6 /home/hans/Perl/stat.pl
No such pseudo-hash field "uidgid" at /home/hans/Perl/stat.pl line 8.
The error message from perl-5.6 I consider as bug. Why concatenating the keys?!
Results are same as if I give "" around uid, gid or the keys are already initialised
or if I use the array on the right side of assigning.
I use perl 5.005_03 from Potato and perl-5.6 from Woody on Debian Linux.
Best regards,
Hans
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=wishlist
---
Site configuration information for perl v5.6.0:
Configured by torin at Sun Dec 3 23:56:54 PST 2000.
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=linux, osvers=2.2.16, archname=i386-linux
uname='linux perv 2.2.16 #1 thu aug 3 05:50:30 pdt 2000 i586 unknown '
config_args='-de -D prefix=/usr -D archname=i386-linux -D startperl=#!/usr/bin/perl-5.6 -D privlib=/usr/lib/perl5/5.6 -D archlib=/usr/lib/perl5/5.6/i386-linux -D sitelib=/usr/local/lib/site_perl -D man1dir=/usr/share/man/man1 -D man1ext=1p -D man3dir=/usr/share/man/man3 -D man3ext=3pm -D ccflags=-D_REENTRANT -DDEBIAN -DAPPLLIB_EXP="/usr/lib/perl5" -D optimize=-O2 -D cccdlflags=-fPIC -D d_dosuid=define -U usesfio -D d_csh=undef -D d_statblks=define -D i_db -D i_ndbm -U installusrbinperl -D pager=/usr/bin/pager -D perladmin=perl@packages.debian.org -D useshrplib -D libperl=libperl.so.5.6.0 -D vendorprefix=/usr -D vendorlib=/usr/lib/perl5/5.005 -D vendorarch=/usr/lib/perl5/5.005/i386-linux'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='cc', optimize='-O2 ', gccversion=2.95.2 20000220 (Debian GNU/Linux)
cppflags='-D_REENTRANT -DDEBIAN -DAPPLLIB_EXP="/usr/lib/perl5" -fno-strict-aliasing -I/usr/local/include'
ccflags ='-D_REENTRANT -DDEBIAN -DAPPLLIB_EXP="/usr/lib/perl5" -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
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
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lposix -lcrypt
libc=/lib/libc-2.1.3.so, so=so, useshrplib=true, libperl=libperl.so.5.6.0
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.6.0:
/usr/lib/perl5
/usr/lib/perl5/5.6/i386-linux
/usr/lib/perl5/5.6
/usr/local/lib/site_perl/i386-linux
/usr/local/lib/site_perl
/usr/lib/perl5/5.005/i386-linux
/usr/lib/perl5/5.005
.
---
Environment for perl v5.6.0:
HOME=/home/hans
LANG=cs_CZ.ISO-8859-2
LANGUAGE (unset)
LC_COLLATE=cs_CZ
LC_CTYPE=cs_CZ
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=~/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Next
-
[ID 20010425.007] hash key; pseudohashes
by Hans Ginzel