[Bioperl-l] Clean-up of Bio::Root::IO

Torsten Seemann torsten.seemann at infotech.monash.edu.au
Fri Oct 6 01:26:10 EDT 2006


Hilmar,

> I don't think there's a need to deprecate - if the methods just plain  
> delegate to whatever File:: module is appropriate their  
> implementation (supposedly) will become very simple and hence won't  
> pose a maintenance burden anymore.

>> I have an uncommitted simplified version of Bio::Root::IO which does
>> this, and "all tests pass". The functions currently (silently)  
>> dispatch
>> directly to their native counterparts.
>>
>> The only tricky function is tempfile() which is *mostly* like
>> File::Temp::tempfile(), but does some voodoo of converting
>> (TEMPLATE=>'xxx') to the non-hash first parameter of the File::  
>> version,
>> so I'm hesitant to commit. It may do other magic - Hilmar?
> 
> Not that I would know of. If the tests pass (without having to change  
> them!) I'd give it a try.

Tempfile.t had two tests that failed. It seems that Bio::Root::IO had 
some magic whereby it would keep a list of all tempfilenames created 
with UNLINK != 0 and when the Bio::Root::IO object was destroyed (eg. 
undef $obj) it would MANUALLY unlink each of them. This would occur 
before File::Temp got to unlink them. Not sure why it was written like 
this (as File::Temp will delete them at the end of the script anyway) 
but maybe it was legacy for when File::Temp::tempfile WASN'T available.
Anyway, I've kept backward compatibility there, although I think 
eventually it should be removed and Tempfile.t adjusted.

Although all tests pass with my new trim Bio/Root/IO.pm I am still 
concerned about committing as the assumption is that the BioPerl test 
suite is good enough to handle such a change to an important module, but 
the reality may be different :-)

Let me know if you think I should commit anyway,

Your advice is appreciated.

-- 
Dr Torsten Seemann               http://www.vicbioinformatics.com
Victorian Bioinformatics Consortium, Monash University, Australia



More information about the Bioperl-l mailing list