Subject: | { recover => 2 } doesn't work with load_html |
It seems that the bug #58024 wasn't fixed completely:
https://rt.cpan.org/Public/Bug/Display.html?id=58024
Passing { recover => 2 } directly to load_html doesn't work:
#!/usr/bin/perl
use strict;
use warnings;
use XML::LibXML;
use Test::More;
my $err_html = '<html><body><lkj/></body></html>';
my $parser = XML::LibXML->new();
my $buf = '';
open(my $fh, '>', \$buf);
{
local *STDERR = $fh;
$parser->load_html(
string => $err_html,
recover => 2,
);
}
close($fh);
is($buf, '', 'no warning emitted');