git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git.pm with recent File::Temp fail

From
H.Merijn Brand <h.m.brand@xs4all.nl>
Date
Apr 29, 2013, 08:32 UTC
Message-ID
<20130429103217.5f50525b@pc09.procura.nl>
In-Reply-To
<7vd2tdn41h.fsf@alter.siamese.dyndns.org>

On Mon, 29 Apr 2013 01:18:18 -0700, Junio C Hamano <gitster@pobox.com> wrote:

> Here is what I'll queue.
> 
> Thanks for the help, all of you.

Thank you. I will keep this conversation as a guide for possible next patches

Show 33 quoted lines
> -- >8 --
> From: H. Merijn Brand <h.m.brand@xs4all.nl>
> Subject: 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 <h.m.brand@xs4all.nl>
> Helped-by: Jeff King <peff@peff.net>
> ---
>  perl/Git.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/perl/Git.pm b/perl/Git.pm
> index 497f420..76383b9 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");
>  
-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.17   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/
Previous: Junio C Hamano
Message 9 of 9 in “Git.pm with recent File::Temp fail”
  1. H.Merijn BrandMar 22, 2013
  2. H.Merijn BrandApr 8, 2013
  3. H.Merijn BrandApr 28, 2013
  4. Jeff KingApr 29, 2013
  5. Junio C HamanoApr 29, 2013
  6. H.Merijn BrandApr 29, 2013
  7. Junio C HamanoApr 29, 2013
  8. Junio C HamanoApr 29, 2013
  9. H.Merijn BrandApr 29, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.