[Bioperl-l] bioperl-live: audit of FIXME/???/TODO/etc and undef/die

Chris Fields cjfields at uiuc.edu
Wed Sep 20 11:48:13 UTC 2006


If you can, please update the Code optimization page so we can keep  
track.

http://www.bioperl.org/wiki/BioPerl_code_optimization

Thanks Sendu!

Chris

On Sep 20, 2006, at 4:26 AM, Sendu Bala wrote:

> Torsten Seemann wrote:
>>
>> "return undef;" => "return;"  # return undef intentional?
>>
>> Bio/DB/Biblio/pdf.pm:    return undef;
>> Bio/DB/Biblio/pdf.pm:    return undef unless $link;
>> Bio/DB/Biblio/pdf.pm:  return undef;
>> Bio/DB/Biblio/eutils.pm:  return undef;
>> Bio/DB/WebDBSeqI.pm:    return undef if ( !defined $self->ua || ! 
>> defin
>> Bio/Tools/Run/RemoteBlast.pm:    return undef if ( !defined $self->ua
>> Bio/FeatureIO/gff.pm:  return undef if $self->fasta_mode();
>> Bio/FeatureIO/gff.pm:  # be graceful about empty lines or  
>> comments, an
>> Bio/FeatureIO/gff.pm:will return undef if not all features in the  
>> stre
>> Bio/Root/IOManager.pm:    return undef unless -e $file;
>> Bio/Root/Object.pm:    return undef unless defined $self->{'_err'};
>
> I've changed all those; none of them seemed intentional.
>
>
>> "die" => "$self->throw" # use Bio::Perl exception handling
>>
>> Bio/Variation/IO.pm:    $format2 = shift || die "Usage: reformat  
>> forma
>> Bio/Phenotype/OMIM/OMIMparser.pm:    if ( ! defined( $description ) )
>> Bio/Phenotype/OMIM/OMIMparser.pm:    if ( ! defined 
>> ( $mutation ) )   {
>> Bio/LiveSeq/Chain.pm:    die "_praepostinsert_array: Something  
>> went ve
>> Bio/Tools/isPcr.pm:    my $seq = $seqio->next_seq || die("cannot  
>> get a
>> Bio/Tools/Analysis/DNA/ESEfinder.pm:  die "Could not get a result"
>> Bio/Tools/Analysis/Protein/NetPhos.pm:  die "Could not get a  
>> result" u
>> Bio/Tools/Analysis/Protein/Mitoprot.pm:  die "Could not get a result"
>> Bio/Tools/Analysis/Protein/Scansite.pm:  die "Could not get a result"
>> Bio/Tools/dpAlign.pm:        die("\nThe C-compiled engine for  
>> Smith Wa
>> Bio/Tools/ipcress.pm:    my $seq = $seqio->next_seq || die("cannot  
>> get
>> Bio/Tools/EPCR.pm:    my $seq = $seqio->next_seq || die("cannot get a
>> Bio/Tools/HMM.pm:        die("\nThe C-compiled engine for Hidden  
>> Marko
>> Bio/Seq/PrimedSeq.pm:      my $file = shift || die "need a file to  
>> rea
>> Bio/Seq/PrimedSeq.pm:     my $file = shift || die "$0 <file>";
>
> Of these, only Variation/IO.pm and Phenotype/OMIM/OMIMparser.pm needed
> changing (most are in the POD). I haven't investigated Lincoln's  
> modules:
>
>> Bio/DB/SeqFeature/Store/DBI/mysql.pm:  $db->store($feature) or die  
>> "Co
>> Bio/DB/SeqFeature/Store/berkeleydb.pm:  $db->store($feature) or die
>> Bio/DB/SeqFeature/Store.pm:  $db->store($feature) or die "Couldn't  
>> sto
>> Bio/Graphics/Glyph.pm:  my $feature = $arg{-feature} or die "No  
>> featur
>> Bio/Graphics/Glyph/image.pm:    open F,$path or die "Can't open  
>> $path:
>> Bio/Graphics/Panel.pm:  open (F,">$imagefile") || die("Can't open  
>> imag
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign






More information about the Bioperl-l mailing list