Subject: | Use of uninitialized value at /its1/25/bit/perl/lib/site_perl/5.005/aix/XML/Twig.pm line 4201 |
I have been receiving the error "Use of uninitialized value at /its1/25/bit/perl/lib/site_perl/5.005/aix/XML/Twig.pm line 4201".
This occurs during XML::Twig::parsefile and appears to happen when parsing a tag with no attributes.
Line 4201 is in 'set_atts' and reads :
if( UNIVERSAL::isa( $_[0], 'HASH'))
where $_[0] would be the first attribute but is not defined if there are no attributes.
I changed the line to the following:
if( defined($_[0]) && UNIVERSAL::isa( $_[0], 'HASH'))
and this seems to have fixed it (although I've only done a couple of tests)
For reference my perl -V is as follows :
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=aix, osvers=4.3.3.0, archname=aix
uname='aix funny 3 4 000001716600 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O', gccversion=
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384'
ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='ld', ldflags ='-s'
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW -lC_r
libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-bE:perl.exp'
cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lc'
Characteristics of this binary (from libperl):
Built under aix
Compiled at Aug 14 1999 08:59:55
@INC:
/usr/opt/perl5/lib/5.00503/aix
/usr/opt/perl5/lib/5.00503
/usr/opt/perl5/lib/site_perl/5.005/aix
/usr/opt/perl5/lib/site_perl/5.005
.