package Class_A; sub new { ## the usual: my $class = shift; my $self = {}; bless $self, $class; } sub newB { my $self = {}; bless $self, 'Class_B'; }