Front page | perl.perl5.porters |
Postings from October 2003
[perl #24084] Problem with 5.8.1 and XML::Simple
Thread Previous
|
Thread Next
From:
perlbug-followup
Date:
October 4, 2003 11:07
Subject:
[perl #24084] Problem with 5.8.1 and XML::Simple
Message ID:
rt-24084-65526.17.070173444035@rt.perl.org
# New Ticket Created by dave@rudedog.org
# Please include the string: [perl #24084]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24084 >
This is a bug report for perl from dave@rudedog.org,
generated with the help of perlbug 1.34 running under perl v5.8.1.
-----------------------------------------------------------------
[Please enter your report here]
I just upgraded to perl 5.8.1 (using Debian/unstable) and it seems to
have broken XML::Simple. Basically, XML::Simple is creating a hash data
structure as expected, but every key and value is empty. After adding
some diagnostics to the XML::Simple source, I found some extreme
strangeness that looks like a Perl bug.
The problem code and its output is below. Both Dumper($element) and
keys %{$element} show that $element is a hashref that has a `Name' key,
but after the $name = $element->{Name} assignment, $name remains
undefined.
- Code -----------------------------------------------------------------
sub start_element {
my $self = shift;
my $element = shift;
print STDERR "Dumper of \$element is ", Dumper($element);
print STDERR "Devel::Peek::Dump of \$element is "; Devel::Peek::Dump $element;
print STDERR "\n";
print STDERR "Keys of \$element are |", join("| |", keys %{$element}), "|\n";
print STDERR "Values of \$element are |", join("| |", values %{$element}), "|\n";
my $name = $element->{Name};
printf STDERR "Name is |%s| |%s|\n", $name, $element->{Name};
print STDERR "Dumper of \$name is ", Dumper($name);
print STDERR "Devel::Peek::Dump of \$name is "; Devel::Peek::Dump $name;
print STDERR "\n";
- Output ----------------------------------------------------------------
Dumper of $element is $VAR1 = {
'LocalName' => 'hey',
'Prefix' => '',
'Attributes' => {},
'Name' => 'hey',
'NamespaceURI' => ''
};
Devel::Peek::Dump of $element is SV = RV(0x817f0b0) at 0x82478ec
REFCNT = 1
FLAGS = (PADBUSY,PADMY,ROK)
RV = 0x84bb108
SV = PVHV(0x82c2d88) at 0x84bb108
REFCNT = 2
FLAGS = (SHAREKEYS)
IV = 5
NV = 0
ARRAY = 0x82c2120 (0:4, 1:3, 2:1)
hash quality = 107.1%
KEYS = 5
FILL = 4
MAX = 7
RITER = -1
EITER = 0x0
Elt "LocalName" HASH = 0x7c3b0f10
SV = PV(0x82b3ec4) at 0x82c1c50
REFCNT = 1
FLAGS = (POK,pPOK,UTF8)
PV = 0x82c25c8 "hey"\0 [UTF8 "hey"]
CUR = 3
LEN = 5
Elt "Prefix" HASH = 0x23ee5d8
SV = PV(0x82b3ea0) at 0x82c1c2c
REFCNT = 1
FLAGS = (POK,pPOK,UTF8)
PV = 0x82c25b8 ""\0 [UTF8 ""]
CUR = 0
LEN = 2
Elt "Attributes" HASH = 0x507896da
SV = RV(0x817f058) at 0x82c1c98
REFCNT = 1
FLAGS = (ROK)
RV = 0x84bb168
SV = PVHV(0x82c2d28) at 0x84bb168
REFCNT = 1
FLAGS = (SHAREKEYS)
IV = 0
NV = 0
ARRAY = 0x84bee30
KEYS = 0
FILL = 0
MAX = 7
RITER = -1
EITER = 0x0
Keys of $element are |LocalName| |Prefix| |Attributes| |Name| |NamespaceURI|
Values of $element are |hey| || |HASH(0x84bb168)| |hey| ||
Name is || ||
Dumper of $name is $VAR1 = undef;
Devel::Peek::Dump of $name is SV = PV(0x82b3ea0) at 0x8249708
REFCNT = 1
FLAGS = (PADBUSY,PADMY)
PV = 0
------------------------------------------------------------------------
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl v5.8.1:
Configured by Debian Project at Tue Sep 30 21:35:53 EST 2003.
Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
Platform:
osname=linux, osvers=2.4.22-xfs+ti1211, archname=i386-linux-thread-multi
uname='linux kosh 2.4.22-xfs+ti1211 #1 wed sep 24 21:17:59 est 2003 i686 gnulinux '
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8.1 -Darchlib=/usr/lib/perl/5.8.1 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.1 -Dsitearch=/usr/local/lib/perl/5.8.1 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.1 -Dd_dosuid -des'
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 ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O3',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='3.3.2 20030908 (Debian prerelease)', 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 =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=-ldl -lm -lpthread -lc -lcrypt
libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so.5.8.1
gnulibc_version='2.3.2'
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.1:
blib/lib
/etc/perl
/usr/local/lib/perl/5.8.1
/usr/local/share/perl/5.8.1
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8.1
/usr/share/perl/5.8.1
/usr/local/lib/site_perl
/usr/local/lib/perl/5.8.0
/usr/local/share/perl/5.8.0
.
---
Environment for perl v5.8.1:
HOME=/home/dave
LANG (unset)
LANGUAGE (unset)
LC_ALL=en_US.ISO-8859-1
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/dave/scripts:/home/dave/scripts:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
PERL5LIB=blib/lib
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Previous
|
Thread Next