perl-HTML-TreeBuilder-LibXML-0.26-18.fc35 fails to build in Fedora 35 because a test fails: $ perl -Ilib t/05_empty.t 1..15 ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 not ok 9 # Failed test at t/05_empty.t line 18. # '' # doesn't match '(?^:<html>)' ok 10 ok 11 not ok 12 # Failed test at t/05_empty.t line 18. # '' # doesn't match '(?^:<html>)' ok 13 ok 14 not ok 15 # Failed test at t/05_empty.t line 18. # '' # doesn't match '(?^:<html>)' # Looks like you failed 3 tests of 15. A difference between passing and failing build root is at <https://koschei.fedoraproject.org/build/10320715>. The failure is triggered by upgrading libxml2 from 2.9.10-12.fc35 to 2.9.12-1.fc35.
The test fails because HTML::TreeBuilder::LibXML returns an empty string while the test expects something containing <html>. Looking at HTML::TreeBuilder::LibXML::Node::as_HTML(), it calls toStringHTML(), falls back on XML::LibXML::Node::toStringC14N() and finally on XML::LibXML::Node::toString(). In the case of an empty string, toStringHTML() cannot be called and, while XML::LibXML::Node::toString() returns '<html><body/></html>', XML::LibXML::Node::toStringC14N() returns an empty string without errors (so this ends up being used). Hummm...
Built for rawhide: https://koji.fedoraproject.org/koji/buildinfo?buildID=1771521