]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/commitdiff
Remove an unused variable
authorVincent Pit <vince@profvince.com>
Mon, 24 Aug 2009 22:18:31 +0000 (00:18 +0200)
committerVincent Pit <vince@profvince.com>
Mon, 24 Aug 2009 22:18:31 +0000 (00:18 +0200)
lib/Test/Valgrind/Session.pm

index f47e4759228e608a636756884a1584eb1ef9a0f3..705e08840c21fe7bc7f1dc1b94f23fbbd391d13f 100644 (file)
@@ -210,25 +210,22 @@ sub _run {
  my @supp_args;
  if ($self->do_suppressions) {
   push @supp_args, '--gen-suppressions=all';
- } else {
-  my @supps;
-  if (not $self->no_def_supp) {
-   my $def_supp = $self->def_supp_file;
-   if (defined $def_supp and not -e $def_supp) {
-    $self->report(Test::Valgrind::Report->new_diag(
-     "Generating suppressions..."
-    ));
-    require Test::Valgrind::Suppressions;
-    Test::Valgrind::Suppressions->generate(
-     tool    => $self->tool,
-     command => $self->command,
-     target  => $def_supp,
-    );
-    $self->_croak('Couldn\'t generate suppressions') unless -e $def_supp;
-    $self->report(Test::Valgrind::Report->new_diag(
-     "Suppressions for this perl stored in $def_supp"
-    ));
-   }
+ } elsif (not $self->no_def_supp) {
+  my $def_supp = $self->def_supp_file;
+  if (defined $def_supp and not -e $def_supp) {
+   $self->report(Test::Valgrind::Report->new_diag(
+    "Generating suppressions..."
+   ));
+   require Test::Valgrind::Suppressions;
+   Test::Valgrind::Suppressions->generate(
+    tool    => $self->tool,
+    command => $self->command,
+    target  => $def_supp,
+   );
+   $self->_croak('Couldn\'t generate suppressions') unless -e $def_supp;
+   $self->report(Test::Valgrind::Report->new_diag(
+    "Suppressions for this perl stored in $def_supp"
+   ));
   }
   push @supp_args, '--suppressions=' . $_ for $self->suppressions;
  }