]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind.pm
A new PerlScript command that specializes the Perl command to scripts
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind.pm
index 1fac2874569b08006eb3e78ada7efd2a794d8cef..a447541b0a7e4e9f63148bcc6f1cbd2a76f6d991 100644 (file)
@@ -136,20 +136,11 @@ sub import {
   return;
  }
 
- my $taint_mode;
- {
-  open my $fh, '<', $file or last;
-  my $first = <$fh>;
-  close $fh;
-  if ($first and my ($args) = $first =~ /^\s*#\s*!\s*perl\s*(.*)/) {
-   $taint_mode = 1 if $args =~ /(?:^|\s)-T(?:$|\s)/;
-  }
- }
-
  require Test::Valgrind::Command;
  my $cmd = Test::Valgrind::Command->new(
-  command => 'Perl',
-  args    => [ '-MTest::Valgrind=run,1', (('-T') x!! $taint_mode), $file ],
+  command => 'PerlScript',
+  file    => $file,
+  args    => [ '-MTest::Valgrind=run,1' ],
  );
 
  my $instanceof = sub {