Skip Menu |

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

Report information
The Basics
Id: 70321
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: rjray [...] blackperl.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.84
Fixed in: (no value)



Subject: Warning "Use of uninitialized value in subroutine entry" occurs
During my test suite for RPC-XML, I am getting a warning from XML::LibXML: Use of uninitialized value in subroutine entry at /Users/rjray/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/darwin-2level/XML/LibXML.pm line 843. Line 843 is just a call to _parse_string(), which appears to be an XS function. I have checked all my calls to parse_string (the Perl wrapping function, which is where line 843 occurs), and I am not passing in undef at any point. This is not a high-priority issue, as XML::LibXML still works fine. But I lack the background in the code to be able to effectively debug this. This occurs regularly on several platforms (both 64-bit and 32-bit) during the test "t/21_xml_libxml.t" from my 0.75 version of RPC::XML. Randy -- Randy J. Ray rjray@blackperl.com randy.j.ray@gmail.com
Hi Randy, On Wed Aug 17 12:21:37 2011, RJRAY wrote: Show quoted text
> During my test suite for RPC-XML, I am getting a warning from > XML::LibXML: > > Use of uninitialized value in subroutine entry at > /Users/rjray/perl5/perlbrew/perls/perl- > 5.14.1/lib/site_perl/5.14.1/darwin-2level/XML/LibXML.pm > line 843. >
This was fixed in «changeset: 1108:5088fff002bd». The problem with the code is that open_callback returned undef which caused the input_callbacks to be shifted, which made the read callback return undef, which together with the "perl -w" flag caused POPp; to emit a warning. I fixed it by checking SvOK() first. This took a long amount of investigation, and you should verify that you're not doing anything wrong in your code. You can find the commit with the fix here: https://bitbucket.org/shlomif/perl-xml-libxml/changeset/5088fff002bd Regards, -- Shlomi Fish
Aha! That explains why it didn't happen before! My use of XML::LibXML::InputCallback is new, to handle an edge-case under MacOS. I'll watch for the next release, and see if the warning goes away. -- Randy J. Ray rjray@blackperl.com randy.j.ray@gmail.com
Fixed in XML-LibXML-1.85 which was uploaded to CPAN now.