in reply to XML::Twig deletes comments

This works as expected (it keeps the comments):
use warnings; use strict; use XML::Twig; my $str = <<EOF; <foo> <!-- hello comment --> <bar>goo</bar> </foo> EOF my $t = XML::Twig->new(comments => 'keep'); $t->parse($str); $t->print(); print "\n"; __END__ <foo> <!-- hello comment --> <bar>goo</bar></foo>
Try to create a small example like this that anyone can run which still demonstrates the problem.

Replies are listed 'Best First'.
Re^2: XML::Twig deletes comments
by slugger415 (Monk) on Sep 02, 2011 at 18:56 UTC
    Thank you, got it working! much appreciated. Scott