[ensembl-dev] Registry->get_adaptor and magic strings

Michael Paulini mh6 at sanger.ac.uk
Fri Nov 26 10:45:06 GMT 2010


I tend to do a

the same as for IO::File, etc and just add a
||die(@!)
with the assumption, that any method that returns undef, failed.

M

On 26/11/2010 10:39, Daniel Sobral wrote:
> Some people during a recent API course commented that 
> Registry->get_adaptor() should return a warning or throw an error when 
> invalid parameters are passed, instead of just returning undef. I also 
> tend to agree with them.
>
> Also, is there an easy / recommended way of knowing all the valid 
> adaptors I can get with the registry?
> I think this goes back to the topic of Ensembl API 'magic strings' 
> that I see sometimes mentioned in the dev mailing list.
> These should be minimized, or at least there should be obvious methods 
> where we could find them.
> Maybe there is and I just don't know about it...
>
> Any opinion/help is most welcome.
>
> Thanks,
> Daniel
>
> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev





More information about the Dev mailing list