提交 eafc2dd5 编写于 作者: H H. Merijn Brand 提交者: Junio C Hamano

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: NH. Merijn Brand <h.m.brand@xs4all.nl>
Helped-by: NJeff King <peff@peff.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 15999998
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册