From: Christian Walde Date: Fri, 7 Sep 2012 12:54:11 +0000 (+0200) Subject: enable temp file deletion in pack.t on Win32 X-Git-Tag: v0.009010~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0de38c118e8361ff200251c4345fe5e947073888;p=p5sagit%2FApp-FatPacker.git enable temp file deletion in pack.t on Win32 The code used in sub script_command_file to slurp file contents leaves ARGV as an open filehandle to the file last slurped. For pack.t this means it cannot remove the temp files on windows due to the left-over filehandle. Closing ARGV explicitly after each slurp fixes this issue. --- diff --git a/Changes b/Changes index 9e8921a..9261b0f 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,4 @@ + - enable temp file deletion in pack.t on Win32 - RT #79489: %fatpacked keys need to be unix paths 0.009009 2012-08-03 diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index 01aed5e..32f7ab6 100644 --- a/lib/App/FatPacker.pm +++ b/lib/App/FatPacker.pm @@ -196,6 +196,7 @@ sub script_command_file { $files{File::Spec::Unix->abs2rel($File::Find::name,$dir)} = do { local (@ARGV, $/) = ($File::Find::name); <> }; + close ARGV; }, $dir); } my $start = stripspace <<' END_START';