]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind/Tool/memcheck.pm
Honor the report class in Tool::memcheck
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind / Tool / memcheck.pm
index 9ec1aa0762fe972793076efaa28c0755bc3bad3b..c32b2ae5e6d0a5792ad5d43f191968e4cbf8ea17 100644 (file)
@@ -9,11 +9,11 @@ Test::Valgrind::Tool::memcheck - Run an analysis through the memcheck tool.
 
 =head1 VERSION
 
-Version 1.01
+Version 1.02
 
 =cut
 
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 
 =head1 DESCRIPTION
 
@@ -186,7 +186,7 @@ package Test::Valgrind::Tool::memcheck::Report;
 
 use base qw/Test::Valgrind::Report/;
 
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 
 my @kinds = qw/
  InvalidFree
@@ -258,7 +258,7 @@ sub dump {
 
 package Test::Valgrind::Tool::memcheck::Twig;
 
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 
 use Scalar::Util;
 
@@ -323,13 +323,14 @@ sub handle_error {
                                      $origin->kid('stack')->children('frame') ];
  }
 
- my $report = Test::Valgrind::Tool::memcheck::Report->new(
+ my $tool = $twig->stash->{tool};
+ my $sess = $tool->_session;
+
+ $sess->report($tool->report_class($sess)->new(
   kind => $kind,
   id   => $id,
   data => $data,
- );
-
- $twig->stash->{tool}->_session->report($report);
+ ));
 
  $twig->purge;
 }
@@ -338,7 +339,7 @@ sub handle_error {
 
 package Test::Valgrind::Tool::memcheck::Twig::Elt;
 
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 
 BEGIN { require XML::Twig; }