From: H. Merijn Brand Date: Mon, 29 Apr 2013 08:09:57 +0000 (-0700) Subject: Git.pm: call tempfile from File::Temp as a regular function X-Git-Tag: v1.8.3-rc1~5^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/eafc2dd59f4d28d4a01deb24df588fd7a29990d8?ds=inline;hp=--cc Git.pm: call tempfile from File::Temp as a regular function We call File::Temp's "tempfile" function as a class method, but it was never designed to be called this way. Older versions seemed to tolerate it, but as of File::Temp 0.23, it blows up like this: $ git svn fetch 'tempfile' can't be called as a method at .../Git.pm line 1117. Fix it by calling it as a regular function, just inside the File::Temp namespace. Signed-off-by: H. Merijn Brand Helped-by: Jeff King Signed-off-by: Junio C Hamano --- eafc2dd59f4d28d4a01deb24df588fd7a29990d8 diff --git a/perl/Git.pm b/perl/Git.pm index 497f420178..76383b987e 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -1039,7 +1039,7 @@ sub _temp_cache { $tmpdir = $self->repo_path(); } - ($$temp_fd, $fname) = File::Temp->tempfile( + ($$temp_fd, $fname) = File::Temp::tempfile( 'Git_XXXXXX', UNLINK => 1, DIR => $tmpdir, ) or throw Error::Simple("couldn't open new temp file");