http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13262
--- Comment #6 from David Cook <[email protected]> --- (In reply to M. de Rooy from comment #5) > Maybe we should just be pragmatic here and replace the lines: > > require XML::LibXML; > my $dom = XML::LibXML->load_xml(string => $output); > my $result = $dom->find( '/just_a_tagname' ); > > by a simple test like index($output,'this is a test')>0 > > LibXML uses overloading in XML::LibXML::Literal (and others) called from > XML::LibXML::Node. Debugging this stuff seems much harder than just > simplifying the test.. Maybe. Using index(), while not as exact, might be "good enough". However, I'm rather intrigued that Kyle is getting errors while you (Marcel) and I are not. I have no idea why it warned "left argument in overloaded package XML::LibXML::NodeList" when it should've been a XML::LibXML::Literal which would've magically stringified. Maybe rather than using index(), we should look into why Kyle is getting that problem though. The answer will determine the solution. If it's an issue of the overloading not working as expected, it would probably be an idea to go with: ok($result->value() eq 'this is a test', 'test name'); However, that still won't work if Kyle really is getting a NodeList back instead of a Literal. Kyle: Could you do a Data::Dumper($result) and tell us what you get? -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
