[Bioperl-l] Bio::RangeI::union

Hilmar Lapp hlapp at gmx.net
Thu Jun 9 21:14:49 EDT 2005


Sounds good to me.

Interfaces may have decorating methods but we wanted to deprecate that 
interfaces are instantiated. So if RangeI tries to instantiate itself 
then that's not good; no decorating method on an interface should ever 
attempt to instantiate the interface.

	-hilmar

On Jun 10, 2005, at 3:39 AM, Aaron J. Mackey wrote:

> Or, how about deprecating the Bio::RangeI->union() construct (since 
> although we've supplied implementations in interface, we don't need to 
> encourage people to use them)?  This is just a weird way to do 
> $newrange = Bio::Range->union(@ranges), right? (which saves a whole 
> capitalized keystroke!)
>
> -Aaron
>
> On Jun 9, 2005, at 2:45 PM, Chris Mungall wrote:
>
>>
>> The pod docs for union() state that this is is valid:
>>
>>   my $newrange = Bio::RangeI->union(@ranges);
>>
>> In the subroutine body, this gets called:
>>
>>   my $self = shift;
>>   ...
>>   $self->new(...)
>>
>> Since $self is equal to the string "Bio::RangeI", rather than an 
>> object
>> implementing this interface, this will result in a call to
>>
>>   Bio::Root::RootI->new("Bio::RangeI",...)
>>
>> This works fine in bp1.4, but in recent bioperl revisions this 
>> results in
>> a warning message that Bio::Root::RootI->new is deprecated, and a
>> delegation to Bio::Root::Root, **omitting the name of the class to be
>> created**, thus creating a Bio::Root::Root object, which is useless 
>> and
>> will inevitably break any code calling the union() method.
>>
>> I think this delegation is completely wrong, and should be removed, 
>> and
>> the warning message switched to an error; OR it should be 
>> undeprecated and
>> the original behaviour behaviour restored
>>
>> If we decide that RootI->new is truly deprecated, then Bio::RangeI 
>> should
>> have to do some $self examination, and use the correct object
>> instantiation method, rather than $self->new. I don't really know 
>> what the
>> correct object instantiation method is - perhaps just 
>> Bio::Range->new()?
>> Or should a factory be used?
>>
>> Personally, I would prefer it if Bio::RootI->new were undeprecated 
>> and the
>> original behaviour restored. deprecating would make perfect sense if
>> bioperl interfaces really were interfaces, which they are not.
>>
>> Cheers
>> Chris
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at portal.open-bio.org
>> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>>
>
> --
> Aaron J. Mackey, Ph.D.
> Project Manager, ApiDB Bioinformatics Resource Center
> Penn Genomics Institute, University of Pennsylvania
> email:  amackey at pcbi.upenn.edu
> office: 215-898-1205
> fax:    215-746-6697
> postal: Penn Genomics Institute
>         Goddard Labs 212
>         415 S. University Avenue
>         Philadelphia, PA  19104-6017
>
> _______________________________________________
> 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