[Bioperl-l] Small changes to some Annotation methods?

Hilmar Lapp hlapp at gmx.net
Wed Jan 21 00:38:09 EST 2004


The array property should be initialized to an empty array upon object 
construction. Returning undef from an array accessor is not good, you 
may break people's code.

Which object are you talking about? Does the respective class not 
initialize the property to be an empty array?

	-hilmar

On Tuesday, January 20, 2004, at 10:20  AM, Stefan Kirov wrote:

> Can we change the accessor methods, for example:
> sub each_gene_name{
>   my ($self, at args) = @_;
>
>   return @{$self->{'_names'}};
> }
> to
> sub each_gene_name{
>   my ($self, at args) = @_;
>   return undef unless ($self->{'_names'});
>   return @{$self->{'_names'}};
> }
> The current implementation will break the code if  return 
> @{$self->{'_names'}} is empty.
> Jason, Heikki- I am asking just in case I am missing something....
>
> Stefan
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------




More information about the Bioperl-l mailing list