http://www.perlmonks.org?node_id=953139


in reply to Multiple instances of the same base class

Usually, whenever you call a package's new method, it should already be returning a brand new instance of itself, so I would think what you have is already mostly correct.

Some other things I noticed though...

I think instead of:

use BasicX;
You actually want:
use base BasicX;

This is because use base establishes a ISA relationship for between your current class and the specified base class(es).

Beyond that, change this section:

my $newclass = BasicX->new(...);
To something like this:
my $newclass = $class->SUPER::new(...);
That should work properly.