Skip Menu |
 

This queue is for tickets about the XML-Twig CPAN distribution.

Report information
The Basics
Id: 4983
Status: resolved
Priority: 0/
Queue: XML-Twig

People
Owner: MIROD [...] cpan.org
Requestors: dclaughton [...] intechsolutions.co.uk
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.11
Fixed in: 3.13



Subject: Use of uninitialized value at /its1/25/bit/perl/lib/site_perl/5.005/aix/XML/Twig.pm line 4201
Download (untitled) / with headers
text/plain 1.9k
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 .
Download (untitled) / with headers
text/plain 420b
Hi, I wasn't able to reproduce the bug (I don't have 5.005 handy and it doesn't show up in 5.8). I added a fix if( isa( $_[0] || '', 'HASH')) The updated version is at http://xmltwig.com/xmltwig/XML-Twig-3.12.tar.gz , could you test it (there is a test that _should_ catch it in the test suite)? I suspect the same problem might occur in other places. If the fix works then I will add it in other places. __ Mirod
From: David Claughton
Download (untitled) / with headers
text/plain 2.1k
Seems to be fixed in XML::Twig v3.13 - Thanks. [guest - Tue Jan 20 06:34:39 2004]: Show quoted text
> 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 Show quoted text
> 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 > .


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.