[Bioperl-l] final proposal: Bio::DB::WebSeqDBI

Hilmar Lapp lapp@gnf.org
Mon, 11 Dec 2000 15:47:39 -0800


Jason Stajich wrote:
> 
> One issue I am not sure how to best deal with, the temporary file removal
> at the end of the life of the Bio::DB::WebSeqDBI object.  The following
> code illustrates a case this will remove files too soon.
> 
> my $seqdb = new Bio::DB::Genbank(-retrievaltype=>'tempfile');
> my $seqio = $seqdb->get_Stream_by_id($accession);
> undef $seqdb;  # this will remove the seqdb object and cleanup the
>                # tempfile that was created
> my $seq = $seqio->next_seq(); # bomb because no file exists now.
> 

Provided that things work the same way as in e.g. C (and it ought to be so,
because it's the OS that dictates it), the tempfile should not be
physically removed as long as there is a stream (filehandle) open on it (it
may be invisible to directory listings though). Since SeqIO::* modules keep
a file handle open until $seqio->close() is called, there should be no
problem. Am I missing something? Have you tested for the behaviour your
mentioning?

> 
> Is the name WebSeqDBI misleading - (ie looks like it would be a DBI
> module...?) We like to use 'I' at the end of a module name to denote
> interfaces.
> 

I agree with David, it's somewhat misleading. I don't have a strong view
though. In general, I wouldn't have considered it as an interface anyway
(why does it qualify as one?), so why not simply omit the trailing 'I'?

	Hilmar

-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp@gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------