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

Chris Mungall cjm at fruitfly.org
Thu Jun 9 14:45:48 EDT 2005

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;

Since $self is equal to the string "Bio::RangeI", rather than an object
implementing this interface, this will result in a call to


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.


More information about the Bioperl-l mailing list