in reply to Inheritance in a Suite of Modules

My solution for this is usually to define methods in the root class that return the names of the aux classes.
In the base class (Thingy), these would return 'Thingy::Cog', 'Thingy::Handle', etc.
In the derived class (MyThingy), these would return 'MyThingy::Cog', 'MyThingy::Handle', etc.
In that way, the differences between the base and the derived classes are kept minimal and isolated.
When the Thingy method that creates a cog object gets called, it refers to the above method to get the name of the class to instantiate.

Of course, this technique requires that the interfaces to the constructors in the base and derived aux classes are kept strictly compatible.

package Thingy; sub cog_class { 'Thingy::Cog' } sub get_cog { my $self = shift; $self->cog_class->new(@_) } package MyThingy; use base Thingy; sub cog_class { 'MyThingy::Cog' }

(It should not be necessary to re-define these name-returning methods in any of the other classes, even if you have, for example, a Cog creating a Ramp, because the cog object should have a reference to the relevant Thingy object, so it can get the name from that, if necessary.)

package MyThingy::Cog; sub get_ramp { my $self = shift; $self->thingy->ramp_class->new(@_) }
We're building the house of the future together.