If the error message really comes from the line you've shown, then $self->{ObjA_ref} is an instance of MyClass and not of ClassA. So your error lies somewhere else, or you haven't shown us the real code. Data::Dumper on $self can be helpful here.
It helps us to help you better if you show self-contained code that exhibits the problem and is directly runnable by us, so we can easily replicate your problem.
In reply to Re: classes that use composition
by Corion
in thread classes that use composition
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |