The attached patch corrects an error in the use of perl's TempFile
API in lib/TempFile.pm in subversion revision 10060.
Essentially, the current version does not take into account that the
"UNLINK=>1" option to the tempfile() function is incompatible with
assigning the returned filehandle to undef to prevent opening of the
Apparently perl's behavior is to open the file handle to ensure that
the UNLINK succeeds. Since it was then being undefined, this caused
the file handle to leak which can eventually cause a "too many open
file descriptors" error.
See: http://search.cpan.org/~jhi/perl-5.8.0/lib/File/Temp.pm for
documentation (although the combination of undef & UNLINK is only
specified as "Invalid" and the actual behavior is left undefined).
Rather than undefining the returned filehandle, the attach patch
assigns it to a variable and then immediately closes it.