[Bioperl-l] Bio::Tools::GuessSeqFormat unknown return value?

Aaron J. Mackey amackey at pcbi.upenn.edu
Wed Dec 10 07:26:25 EST 2003


I'd vote for undef as the most useful "Perlish" convention:

  die "Say what?" unless $format = $guesser->guess_format($file);

vs:

  die "Say what?" unless ($format = $guesser->guess_format($file)) && 
$format ne "unknown";

-Aaron



On Dec 10, 2003, at 4:35 AM, Heikki Lehvaslaiho wrote:

>
> Bio::Tools::GuessSeqFormat returns now string 'unknown'. My question 
> is: how
> strongly should we enforce the convention that unknown values return 
> undef?
>
> In practice, the choises are (1) undef, (2) empty string, (3) zero, (4)
> predefined string value.  What are are the advantages and 
> disadvantages of
> this. Discuss.
>
> I seem to remember that Hilmar felt strongly about this. ;-)
>
> 	-Heikki
>
> -- 
> ______ _/      _/_____________________________________________________
>       _/      _/                      http://www.ebi.ac.uk/mutations/
>      _/  _/  _/  Heikki Lehvaslaiho    heikki_at_ebi ac uk
>     _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
>    _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
>   _/  _/  _/  Cambs. CB10 1SD, United Kingdom
>      _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
> ___ _/_/_/_/_/________________________________________________________
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list