]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - t/lib/Test/Valgrind/Test/Action.pm
Switch to qw<>
[perl/modules/Test-Valgrind.git] / t / lib / Test / Valgrind / Test / Action.pm
index 0ecee8f65d2fcf474a47be1f15b94bddcbad9466..8b41a68d6239bff23f9c0b5dc196a8312fcd3c25 100644 (file)
@@ -3,7 +3,7 @@ package Test::Valgrind::Test::Action;
 use strict;
 use warnings;
 
-use base qw/Test::Valgrind::Action::Test/;
+use base qw<Test::Valgrind::Action::Test>;
 
 my $extra_tests;
 
@@ -29,11 +29,11 @@ sub report_smart {
  my ($self, $sess, $report) = @_;
 
  if ($report->can('is_leak') and $report->is_leak) {
-  my $trace = join ' ', map { $_->[2] } @{$report->data->{stack} || []}[0 .. 2];
+  my $data  = $report->data;
+  my $trace = join ' ', map { $_->[2] } @{$data->{stack} || []}[0 .. 2];
   if ($trace eq 'malloc XS_Test__Valgrind_leak Perl_pp_entersub') {
    my $tb = Test::Builder->new;
    $tb->diag("The subsequent report was correctly caught:\n" . $report->dump);
-   my $data = $report->data;
    $tb->is_eq($data->{leakedbytes},  10_000, '10_000 bytes leaked');
    $tb->is_eq($data->{leakedblocks}, 1,      '  in one block');
    return;