Skip to content

Commit

Permalink
see if this fixes stupid Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
DrHyde committed Aug 11, 2021
1 parent a075d18 commit 0bcf28e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/CPAN/FindDependencies.pm
Expand Up @@ -444,7 +444,7 @@ sub _getreqs {
# this but it doesn't work, for either zip or tar <shrug>
# # my $tar = Archive::Tar->new();
# # $tar->read([string opened as file])
my(undef, $tempfile) = tempfile('CPAN-FindDependencies-XXXXXXXX', UNLINK => 1, TMPDIR => 1, OPEN => 0);
my(undef, $tempfile) = tempfile('CPAN-FindDependencies-XXXXXXXX', TMPDIR => 1, OPEN => 0);
open(my $fh, '>', "$tempfile") || die("Can't write $tempfile: $!\n");
binmode($fh); # Windows smells of wee
print $fh $file_data;
Expand All @@ -466,6 +466,8 @@ sub _getreqs {
}->($tempfile);
} else { $rval = $file_data; } # oh, it must have been a meta file

unlink $tempfile;

return $rval;
},
);
Expand Down

0 comments on commit 0bcf28e

Please sign in to comment.