in reply to classes that use composition

Your MyClass constructor is all wrong:

sub new { my $self = {}; $self->{ObjA_ref} = shift; ## This is the class name Eg. 'MyClass' $self->{ObjB_ref} = shift; ## This is the ClassA ref bless $self; return $self; }

Try something like this:

sub new { my $class = shift; ##NB my $self = {}; $self->{ObjA_ref} = shift; $self->{ObjB_ref} = shift; bless $self, $class; return $self; }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"