]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - gen.pl
Generate suppressions with eval BLOCK, and test it too
[perl/modules/Test-Valgrind.git] / gen.pl
diff --git a/gen.pl b/gen.pl
index 828a6b9279380589ced71dade59828d527b155de..99d5ca5cbf196d17b7af18e2f876b243056f87f7 100755 (executable)
--- a/gen.pl
+++ b/gen.pl
@@ -4,14 +4,14 @@ use strict;
 use warnings;
 
 use Test::More;
-eval <<'EOD';
-use Test::Valgrind
- diag    => 1,
- no_test => 1,
- no_supp => 1,
- callers => 50,
- extra   => [ qw/--show-reachable=yes --gen-suppressions=all/ ]
-EOD
+eval {
+ use Test::Valgrind
 diag    => 1,
 no_test => 1,
 no_supp => 1,
 callers => 50,
+  extra   => [ qw/--show-reachable=yes --gen-suppressions=all/ ];
+};
 if ($@) {
  plan skip_all => 'Test::Valgrind is required to run test your distribution with valgrind';
 } else {
@@ -25,4 +25,3 @@ if ($@) {
 }
 
 1;
-