Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: michael [...] dynamine.net
Cc:
AdminCc:

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



Subject: suppress_errors option not honored by load_html() method if set in parser object
Date: Thu, 31 Dec 2009 18:38:57 -0800
To: bug-XML-LibXML [...] rt.cpan.org
From: Michael Fischer <michael [...] dynamine.net>
These two code fragments behave differently, though arguably they should behave identically: # # Case 1: Fails - suppress_errors option appears to be ignored # (but strangely, recover is honored) # my $url = "http://finance.yahoo.com"; my $mech = WWW::Mechanize->new(); my $parser = XML::LibXML->new(); $parser->set_option("recover", 1); $parser->set_option("suppress_errors", 1); my $dom = $parser->load_html(string => $mech->content()); # # Case 2: Succeeds - suppress_errors option honored correctly # my $url = "http://finance.yahoo.com"; my $mech = WWW::Mechanize->new(); my $parser = XML::LibXML->new(); my $dom = $parser->load_html(string => $mech->content(), recover => 1, suppress_errors => 1); Not sure what's going on here. Must be something in _parse_html_string() ?
Thanks for the report - this is now fixed in the bitbucket repository: https://bitbucket.org/shlomif/perl-xml-libxml It will be available in the next CPAN release. In the process of investigating this bug, I found several similar bugs in the Perl code, so thanks again. Regards, -- Shlomi Fish