[Bioperl-l] multiple inheritance
jason at cgt.duhs.duke.edu
Wed Jul 30 16:12:46 EDT 2003
Hmm - how should we solve the multiple inheritance when we want to chain
both constructors. Using SUPER just goes up the tree and will follow B
first up to A and never call C's constructor.
@ISA = qw(B C);
The Right Way* to do this is of course not having multiple inheritance OR
to use The Damian's NEXT
We run into this for SeqFeature::SimilarityPair which ISA FeaturePair and
a Similarity - the soln there was not to rely on the constructor for
I am hitting it again for my Tree::AlleleNode objects which are
PopGen::Individuals (genotype containers) and Tree::Node (as part of the
My soln will be to explictly code all the initialization parameters for
the skipped superclass (C as in above example) as copy+paste
NEXT is part of perl 5.8.0 and would remove a lot of issues wrt to
chaining destructors that we have some code hacks for in Bio::Root::Root.
But I am wary of adding another module dependancy.
jason at cgt.mc.duke.edu
More information about the Bioperl-l