From: Vincent Pit Date: Mon, 24 Aug 2009 22:31:54 +0000 (+0200) Subject: Honor the report class in Tool::memcheck X-Git-Tag: v1.10~27 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=74358c574d25781638689e3c3833b07928f17a02;p=perl%2Fmodules%2FTest-Valgrind.git Honor the report class in Tool::memcheck --- diff --git a/lib/Test/Valgrind/Tool/memcheck.pm b/lib/Test/Valgrind/Tool/memcheck.pm index 4f1c5a9..c32b2ae 100644 --- a/lib/Test/Valgrind/Tool/memcheck.pm +++ b/lib/Test/Valgrind/Tool/memcheck.pm @@ -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; }