Re: [PATCH] perlbug and no sendmail Moin,

On Saturday 06 October 2007 15:37:16 Tels wrote:
> Moin,
>
> I am trying to send an "ok" report via perlbug, but my system doesn't
> have Mail::Send or sendmail installed. So perlbug says:
>
> 	I am terribly sorry, but I cannot find sendmail, or a close
> 	equivalent, and the perl package Mail::Send has not been
> 	installed, so I can't send your bug report. We apologize for the
> 	inconvenience.
>
> 	So you may attempt to find some way of sending your message, it
> 	has been left in the file `/tmp/waydUGbg7E'.
>
> However, the file is not there. It turns out that the code here:
>
> 	sub filename {
> 	    if ($::HaveTemp) {
> 	        # Good. Use a secure temp file
> 	        my ($fh, $filename) = File::Temp::tempfile(UNLINK => 1);
> 		close($fh);
>
> is responsible for removing the temp file when perlbug exits.
>
> Changing this to "UNLINK => 0" fixes this. Attached is a patch to do
> this. I do think that patch is safe, because perlbug itself unlinks
> the $filename in two places manually, in a VMS safe way.
>
> If anyone could verify that I would be glad.

Here is a better patch, also instructing the user about the subject and 
To: to be used (as I had no way to guess these):

All the best,

Tels

-- 
 Signed on Sat Oct  6 16:28:27 2007 with key 0x93B84C15.
 View my photo gallery: http://bloodgate.com/photos
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Eat, eat, eat, eat the delicious sandwich!"

  -- Elan the Bard (Order of the Stick)
