--- lib/ExtUtils/instmodsh.old 2005-06-28 16:57:43.000000000 -0400 +++ lib/ExtUtils/instmodsh 2005-06-28 16:59:28.000000000 -0400 @@ -2,6 +2,7 @@ use strict; use IO::File; +use File::Temp; use ExtUtils::Packlist; use ExtUtils::Installed; @@ -58,16 +59,12 @@ while (1) $reply =~ /^t\s*/ and do { my $file = (split(' ', $reply))[1]; - my $tmp = "/tmp/inst.$$"; - if (my $fh = IO::File->new($tmp, "w")) - { - $fh->print(join("\n", $Inst->files($module))); - $fh->close(); - system("tar cvf $file -I $tmp"); - unlink($tmp); - last CASE; - } - else { print("Can't open $file: $!\n"); } + my ($fh, $tmp) = File::Temp::tempfile(UNLINK => 1); + $fh->print(join("\n", $Inst->files($module))); + $fh->close(); + # This used to use -I which is wrong for GNU tar. + system("tar cvf $file -T $tmp"); + unlink($tmp); last CASE; }; $reply eq 'v' and do