Jon Lang wrote:
Yes, though note that they will only share a slot if they have the exact
same type. Otherwise it's a composition-time error.
Daniel Ruoso wrote:
May I pose three more questions?
1. I guess that even using $!A::bar in methods of B is an
access violation, right? I.e. A needs to trust B for that
to be allowed.
2. The object has to carry $!A::bar and $!B::bar separately, right?
3. How are attribute storage locations handled in multiple inheritance?
Are all base classes virtual and hence their slots appear only once
in the object's storage?
In SMOP, it is handled based on the package of the Class, the private
storage inside the object is something like
Note that this ought only be true of class inheritance; with role
composition, there should only be one $!bar in the class, no matter
how many roles define it.