[Bioperl-l] Too many links at LoadHelper.pm

Chris Fields cjfields at illinois.edu
Sat Feb 6 04:33:20 UTC 2010


On Feb 5, 2010, at 10:06 PM, Mark A. Jensen wrote:

> That's a good thought; when writing a Bioperl
> tempfile, I find I must
> 
> ($fh, $fn) = tempfile();
> $fh->close;
> $seqio = Bio::SeqIO( -file => ">$fn", -format=>'fasta');
> 
> since the better way (always using the filehandle)
> 
> ($fh, $fn) = tempfile;
> $seqio = Bio::SeqIO( -fh => $fh, -format=>'fasta');
> 
> doesn't seem to work, though $fh should be open
> for both writing and reading. If people do the former
> kludge without closing the handle, File::Temp can't
> auto-unlink, but it won't cluck about it either.
> 
> If I missing something about writing to temp filehandles
> here, please set me straight-
> cheers MAJ

No, I think you're on the right track.  There isn't any reason why using a temp filehandle shouldn't work with the various *IO that I can think of, so I would consider that a bug.  Does the same thing occur when using Bio::Root::IO::tempfile() (which just wraps File::Temp)?

chris



More information about the Bioperl-l mailing list