Package: libxml-mini-perl Version: 1.2.8-1 Severity: important
Hello ! I use libxml-mini-perl to write/read XML files, and I came across one serious bug as I was trying to read files produced by libxml-mini-perl. Perl locks with a message: Deep recursion on subroutine "XML::Mini::Document::fromSubStringBT" at /usr/share/perl5/XML/Mini/Document.pm line 485. I made some sample file reproducing the actual bug: #!/usr/bin/perl use XML::Mini::Document; use Data::Dumper; ###### CREATING XML ####### # Create a new document from scratch my $newDoc = XML::Mini::Document->new(); my $newDocRoot = $newDoc->getRoot(); # create the <? xml ?> header my $xmlHeader = $newDocRoot->header('xml'); # add the version $xmlHeader->attribute('version', '1.0'); my $current = $newDocRoot; for my $i (1..2) { my $person = $current->createChild('person'); $person->text("Biniou !!"); $current = $person; } # output the document my $string = $newDoc->toString(); print $string; # create a new object my $xmlDoc = XML::Mini::Document->new(); # init the doc from an XML string $xmlDoc->parse($string); # You may use the toHash() method to automatically # convert the XML into a hash reference my $xmlHash = $xmlDoc->toHash(); print Dumper($xmlHash); --------------------------------- Setting up the debug flag gives this output : XML::Mini LOG MESSAGE:Setting value of node to 'Biniou !!' XML::Mini LOG MESSAGE:Appending node to person XML::Mini LOG MESSAGE:Returning value of node as 'Biniou !!' XML::Mini LOG MESSAGE:Setting value of node to 'Biniou !!' XML::Mini LOG MESSAGE:Appending node to person XML::Mini LOG MESSAGE:Returning value of node as 'Biniou !!' XML::Mini LOG MESSAGE:Node::toString() call with depth 2 XML::Mini LOG MESSAGE:Node::toString() call with depth 3 XML::Mini LOG MESSAGE:Called fromSubString() with parent 'PSYCHOGENIC_ROOT_ELEMENT' XML::Mini LOG MESSAGE:Called fromSubStringBT() with parent 'PSYCHOGENIC_ROOT_ELEMENT' (the last two lines are repeated over and over). I didn't have time to understand what happens, but I hope this informations will help. To finish with, it is closely linked to the fact that I set text. The same thing with setting attributes does not fail. Thanks for considering this !! Vincent Fourmond -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.7 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages libxml-mini-perl depends on: ii perl 5.8.4-5 Larry Wall's Practical Extraction -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]