Skip Menu |

This queue is for tickets about the XML-Twig CPAN distribution.

Report information
The Basics
Id: 39848
Status: resolved
Priority: 0/
Queue: XML-Twig

People
Owner: Nobody in particular
Requestors: grandpa [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.32
Fixed in: 3.33



Subject: XML::Twig generating extra close tag
An extra close tag is generated by the following code: use XML::Twig; my $org = <<XML; <XXX> </XXX> XML print "XML::Twig version $XML::Twig::VERSION\n"; my $twig = XML::Twig->new ( twig_roots => {'head' => \&editNode,}, twig_print_outside_roots => 1 ); $twig->parse ($org); $twig->flush (); sub editNode { my ($t, $elt) = @_; $t->flush (); } the extra tag is not generated if the flush call following the parse call is not made.
On Mon Oct 06 21:06:00 2008, GRANDPA wrote: Show quoted text
> An extra close tag is generated by the following code: > > use XML::Twig; > > my $org = <<XML; > <XXX> > </XXX> > XML > > print "XML::Twig version $XML::Twig::VERSION\n"; > > my $twig = XML::Twig->new ( > twig_roots => {'head' => \&editNode,}, > twig_print_outside_roots => 1 > ); > > $twig->parse ($org); > $twig->flush (); > > > sub editNode { > my ($t, $elt) = @_; > > $t->flush (); > } > > the extra tag is not generated if the flush call following the parse > call is not made.
I am sorry I did not see this ticket before. The problem is fixed in the development version. __ mirod