]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/commitdiff
Honor the report class in Tool::memcheck
authorVincent Pit <vince@profvince.com>
Mon, 24 Aug 2009 22:31:54 +0000 (00:31 +0200)
committerVincent Pit <vince@profvince.com>
Mon, 24 Aug 2009 22:31:54 +0000 (00:31 +0200)
lib/Test/Valgrind/Tool/memcheck.pm

index 4f1c5a9f422f982f9d4471913acced0f04537e7f..c32b2ae5e6d0a5792ad5d43f191968e4cbf8ea17 100644 (file)
@@ -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;
 }