Subject: | Warning produced when run under perl -w |
When HTML::HTML5::Parser is used in a perl interpreter started with the
-w flag (which enables warnings) I get the following warning:
Argument "" isn't numeric in numeric eq (==) at
/Volumes/Media/smoke/thr/conf/perl-5.10.0/.cpanplus/5.10.0/build/HTML-HTML5-Parser-0.03/blib/lib/HTML/HTML5/Parser/TagSoupParser.pm
line 5524.
(See http://www.cpantesters.org/cpan/report/6975840)
I was able to get this warning with a simple case of
<table><tr><td><a></a></td></tr></table> and it gave a backtrace of
at
/usr/local/lib/perl5/site_perl/5.10.1/HTML/HTML5/Parser/TagSoupParser.pm
line 5523
HTML::HTML5::Parser::TagSoupParser::_tree_construction_main('HTML::HTML5::Parser::TagSoupParser=HASH(0x289fca00)')
called at
/usr/local/lib/perl5/site_perl/5.10.1/HTML/HTML5/Parser/TagSoupParser.pm
line 938
HTML::HTML5::Parser::TagSoupParser::_construct_tree('HTML::HTML5::Parser::TagSoupParser=HASH(0x289fca00)')
called at
/usr/local/lib/perl5/site_perl/5.10.1/HTML/HTML5/Parser/TagSoupParser.pm
line 805
HTML::HTML5::Parser::TagSoupParser::parse_char_stream('HTML::HTML5::Parser::TagSoupParser=HASH(0x289fca00)',
'HTML::HTML5::Parser::Charset::DecodeHandle::Encode=HASH(0x290...',
'XML::LibXML::Document=SCALAR(0x288eddac)', 'CODE(0x288caa8c)') called
at
/usr/local/lib/perl5/site_perl/5.10.1/HTML/HTML5/Parser/TagSoupParser.pm
line 618
HTML::HTML5::Parser::TagSoupParser::__ANON__() called at
/usr/local/lib/perl5/site_perl/5.10.1/Error.pm line 415
eval {...} called at
/usr/local/lib/perl5/site_perl/5.10.1/Error.pm line 407
Error::subs::try('CODE(0x29013e24)', 'HASH(0x29013a64)') called
at
/usr/local/lib/perl5/site_perl/5.10.1/HTML/HTML5/Parser/TagSoupParser.pm
line 646
HTML::HTML5::Parser::TagSoupParser::parse_byte_stream('HTML::HTML5::Parser::TagSoupParser',
undef, 'GLOB(0x2890c834)', 'XML::LibXML::Document=SCALAR(0x288eddac)',
'CODE(0x288caa8c)') called at
/usr/local/lib/perl5/site_perl/5.10.1/HTML/HTML5/Parser/TagSoupParser.pm
line 385
HTML::HTML5::Parser::TagSoupParser::parse_byte_string('HTML::HTML5::Parser::TagSoupParser',
undef, '<table><tr><td><a></a></td></tr></table>\x{a}',
'XML::LibXML::Document=SCALAR(0x288eddac)', 'CODE(0x288caa8c)') called
at /usr/local/lib/perl5/site_perl/5.10.1/HTML/HTML5/Parser.pm line 230
HTML::HTML5::Parser::parse_string('HTML::HTML5::Parser=HASH(0x283060dc)', '<table><tr><td><a></a></td></tr></table>\x{a}')
called at -e line 1.
I tried to look through the code, but the single subroutine is so
gigantic, I'm sure you'll have more luck than I.