Subject: | XML::LibXML::InputCallback object not reset to usable state after parsing |
the state of the XML::LibXML::InputCallback object doesn't appear to be
reset after finishing parsing. This means subsequent requests to parse
xml data will not correctly trigger the input callbacks.
Attached is a patch for the 28new_callbacks_multiple.t test that
attempts to parse the input xml a second time which ends up failing
because of the problem with XML::LibXML::InputCallback.
Subject: | icb.patch |
Index: t/28new_callbacks_multiple.t
===================================================================
--- t/28new_callbacks_multiple.t (revision 819)
+++ t/28new_callbacks_multiple.t (working copy)
@@ -60,9 +60,12 @@
$parser->expand_xinclude(1);
$parser->input_callbacks($icb);
my $doc = $parser->parse_string($string);
+ my $doc2 = $parser->parse_string($string);
ok($doc);
ok($doc->string_value(), "\ntest\nbar..\nbar..\n");
+ ok($doc2);
+ ok($doc2->string_value(), "\ntest\nbar..\nbar..\n");
print $doc->serialize();
$icb->unregister_callbacks( [ \&match_hash2, \&open_hash,