use strict;
use warnings;
-our $VERSION = '1.02';
+our $VERSION = '1.10';
use Scalar::Util ();
my $data;
- $data->{what} = $node->kid('what')->text;
+ my ($what, $xwhat);
+ if ($twig->protocol_version >= 4) {
+ $xwhat = $node->first_child('xwhat');
+ $what = $xwhat->kid('text')->text if defined $xwhat;
+ }
+ $what = $node->kid('what')->text unless defined $what;
+ $data->{what} = $what;
+
$data->{stack} = [ map $_->listify_frame,
$node->kid('stack')->children('frame') ];
for (qw/leakedbytes leakedblocks/) {
- my $kid = $node->first_child($_);
+ my $kid = ($xwhat || $node)->first_child($_);
next unless $kid;
$data->{$_} = int $kid->text;
}
package Test::Valgrind::Parser::XML::Twig::Elt;
-our $VERSION = '1.02';
+our $VERSION = '1.10';
BEGIN { require XML::Twig; }