Subject: | [BUG] XML::SAX-0.96 includes files twice |
Date: | Sun, 4 Apr 2010 13:53:24 +0200 |
To: | bug-XML-SAX [...] rt.cpan.org |
From: | Henry Gebhardt <hsggebhardt [...] googlemail.com> |
Hi there!
This bug is solved by installing XML::SAX::Expat-0.40, but I'll
report it anyway. Thanks.
I have an XML file "in1.xml":
<one>This is number one.</one>
and another one including it, called "metadef_simple.xml":
<!DOCTYPE pipes [
<!ENTITY pipe_one SYSTEM "in1.xml">
]>
<pipedefs>
&pipe_one;
</pipedefs>
and the following perl code:
#!/usr/bin/perl -w
use strict;
use warnings;
use XML::Simple qw(:strict);
use Data::Dumper;
my $filename = "metadef_simple.xml";
my $ref = XMLin($filename, ForceArray => 1, KeyAttr => {});
print Dumper($ref);
I expect "This is number one." to be included only once, yet it
appears twice, like so:
$VAR1 = {
'one' => [
'This is number one.',
'This is number one.'
]
};
Thanks,
Henry
More info:
Distribution: Gentoo, x86_64, unstable
XML::Simple version: 2.18
XML::SAX version: 0.96
perl -V:
Summary of my perl5 (revision 5 version 10 subversion 1)
configuration:
Platform:
osname=linux, osvers=2.6.33-rc8, archname=x86_64-linux
uname='linux bimsstein 2.6.33-rc8 #26 smp sat feb 13 19:25:31
cet 2010 x86_64 intel(r) core(tm)2 duo cpu l7500 @ 1.60ghz
genuineintel gnulinux ' config_args='-des -Duseshrplib
-Darchname=x86_64-linux -Dcc=x86_64-pc-linux-gnu-gcc
-Doptimize=-march=core2 -O2 -pipe -Dscriptdir=/usr/bin
-Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr
-Dprivlib=/usr/lib64/perl5/5.10.1
-Darchlib=/usr/lib64/perl5/5.10.1/x86_64-linux
-Dvendorlib=/usr/lib64/perl5/vendor_perl/5.10.1
-Dvendorarch=/usr/lib64/perl5/vendor_perl/5.10.1/x86_64-linux
-Dsitelib=/usr/lib64/perl5/site_perl/5.10.1
-Dsitearch=/usr/lib64/perl5/site_perl/5.10.1/x86_64-linux
-Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3
-Dinstallman1dir=/usr/share/man/man1
-Dinstallman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm
-Dlibperl=libperl.so.5.10.1 -Dlocincpth= -Duselargefiles
-Dd_semctl_semun -Dinc_version_list=5.10.0 5.10.0/x86_64-linux
-Dcf_by=Gentoo -Dmyhostname=localhost -Dperladmin=root@localhost
-Dinstallusrbinperl=n -Ud_csh -Uusenm -Di_ndbm -Di_gdbm -Di_db
-Dusrinc=/usr/include
-Dlibpth=/usr/local/lib64 /lib64 /usr/lib64' hint=recommended,
useposix=true, d_sigaction=define useithreads=undef,
usemultiplicity=undef useperlio=define, d_sfio=undef,
uselargefiles=define, usesocks=undef use64bitint=define,
use64bitall=define, uselongdouble=undef usemymalloc=n,
bincompat5005=undef Compiler: cc='x86_64-pc-linux-gnu-gcc',
ccflags ='-fno-strict-aliasing -pipe -fstack-protector
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-march=core2 -O2 -pipe', cppflags='-fno-strict-aliasing
-pipe -fstack-protector' ccversion='', gccversion='4.4.3',
gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8,
byteorder=12345678 d_longlong=define, longlongsize=8,
d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8,
nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define Linker and Libraries:
ld='x86_64-pc-linux-gnu-gcc', ldflags =' -fstack-protector'
libpth=/usr/local/lib64 /lib64 /usr/lib64 libs=-lpthread -lnsl
-lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.11.so, so=so, useshrplib=true,
libperl=libperl.so.5.10.1 gnulibc_version='2.11' Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -march=core2 -O2 -pipe
-fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
Built under linux
Compiled at Feb 14 2010 13:50:23
@INC:
/usr/lib64/perl5/site_perl/5.10.1/x86_64-linux
/usr/lib64/perl5/site_perl/5.10.1
/usr/lib64/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.10.1/x86_64-linux
/usr/lib64/perl5/vendor_perl/5.10.1
/usr/lib64/perl5/vendor_perl
/usr/lib64/perl5/5.10.1/x86_64-linux
/usr/lib64/perl5/5.10.1
.