Skip Menu |
 

This queue is for tickets about the HTML-HTML5-Parser CPAN distribution.

Report information
The Basics
Id: 55845
Status: resolved
Worked: 5 min
Priority: 0/
Queue: HTML-HTML5-Parser

People
Owner: perl [...] toby.ink
Requestors: DOUGDUDE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.03
Fixed in: 0.04



Subject: Warning produced when run under perl -w
Download (untitled) / with headers
text/plain 2.5k
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.
Download (untitled) / with headers
text/plain 348b
TagSoupParser.pm is a bit of a maintenance nightmare. I didn't write it myself - just ported it to use XML::LibXML as the DOM, and to remove non-CPAN dependencies. I've added a patch to the code in my subversion repo which adds "no warnings". Hopefully this will quieten perl -w. I'm not yet marking this bug as closed until I've confirmed it.
Download (untitled) / with headers
text/plain 490b
I copied the changed file onto my local computer and it suppressed the warnings. On Tue Mar 23 14:54:09 2010, TOBYINK wrote: Show quoted text
> TagSoupParser.pm is a bit of a maintenance nightmare. I didn't write it > myself - just ported it to use XML::LibXML as the DOM, and to remove > non-CPAN dependencies. > > I've added a patch to the code in my subversion repo which adds "no > warnings". Hopefully this will quieten perl -w. I'm not yet marking > this bug as closed until I've confirmed it.
Download (untitled) / with headers
text/plain 140b
I've released 0.04 with the previously mentioned change included. Hopefully this solves the problem mentioned. If not, feel free to reopen.


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.