]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/commitdiff
Silence some useless warnings from File::Temp
authorVincent Pit <perl@profvince.com>
Sun, 15 Nov 2015 18:34:01 +0000 (16:34 -0200)
committerVincent Pit <perl@profvince.com>
Sun, 15 Nov 2015 18:34:43 +0000 (16:34 -0200)
They only appear when the tests are run with -w, which happens with old
versions of Test::Harness.

t/lib/Test/Valgrind/FakeValgrind.pm

index 71077bd65b8275cef5e74f9dc284edd76fedb2a0..3f61ba6c32f05d87321ccd0e7589bc47b509905d 100644 (file)
@@ -49,6 +49,7 @@ sub new {
  } else {
   # Can't use the OO interface if we don't wan't the file to be opened by
   # default, but then we have to deal with cleanup ourselves.
+  local $^W = 0;
   (undef, my $tmp_file) = File::Temp::tempfile(
    TEMPLATE => 'fakevgXXXX',
    TMPDIR   => 1,