]> mj.ucw.cz Git - git-tools.git/commitdiff
Update2: Avoid File::Temp->newdir(), as it requires too new Perl
authorMartin Mares <mj@ucw.cz>
Fri, 29 Jun 2012 19:45:44 +0000 (21:45 +0200)
committerMartin Mares <mj@ucw.cz>
Fri, 29 Jun 2012 19:45:44 +0000 (21:45 +0200)
update2

diff --git a/update2 b/update2
index e27c46226ed6c98c51f39971a324bb3c8a594ebe..933feaab0c11257bcd081f04555f6d84e11a07b1 100755 (executable)
--- a/update2
+++ b/update2
@@ -31,9 +31,8 @@ $ref =~ s{^refs/heads/}{} or exit 0;
 $old ne $new or exit 0;
 
 my $subj = '[' . $subject_prefix . ($ref eq 'master' ? '' : "/$ref") . ']';
-my $tmpdir = File::Temp->newdir() or die;
-my $outname = "$tmpdir/0";
-my $out = IO::File->new($outname, '>') or die;
+my $out = File::Temp->new() or die;
+my $outname = $out->filename;
 $out->autoflush(1);
 close STDOUT;
 open STDOUT, '>&', $out or die;