Fix leaking temporary files in tests. RT#59166
Tomas Doran [Fri, 21 Oct 2011 22:56:05 +0000 (15:56 -0700)]
Changes
t/back_compat.t

diff --git a/Changes b/Changes
index 4632cb3..09c9b06 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
 This file documents the revision history for Perl extension Catalyst-Devel.
 
+        - Fix leaking temporary files in tests. RT#59166
         - Fix generated Makefile.PL to always contain unix style paths,
           even on Win32. RT#65456
         - Fix tests generated for controllers generated with --mechanize
index 4e23b7d..0937bab 100644 (file)
@@ -25,7 +25,7 @@ package MyTestHelper;
 use Test::More;
 use File::Temp qw/tempfile/;
 
-my ($fh, $fn) = tempfile;
+my ($fh, $fn) = tempfile( UNLINK => 1 );
 close $fh;
 $helper->render_file('example1',  $fn, { test_var => 'test_val' });
 open $fh, $fn or die $@;