Subject: Re: [PATCH v2] Git.pm: Use File::Temp->tempfile instead of ->new

From: Marcus Griep <[email-masked]>
Date: Tue, 09 Sep 2008 13:35:44 -0400

Abhijit Menon-Sen wrote:
> At 2008-09-08 12:53:01 -0400, [email-masked] wrote:
>> +		my $fname;
>> +		($$temp_fd, $fname) = File::Temp->tempfile(
>> +			'Git_XXXXXX', UNLINK => 1
>>  			) or throw Error::Simple("couldn't open new temp file");
> 
> What happens when tempfile croaks on error?

I was indifferent to the idea of catching the ->tempfile croak just to hide it in our
own error (since the ->tempfile croak would have more information), in which case the
extra 'or throw' may be superfluous, but I kept it as a defensive programming practice.

-- 
Marcus Griep
GPG Key ID: 0x5E968152
——
http://www.boohaunt.net
את.ψο´