On Fri, Apr 23, 2004 at 02:37:58PM -0700, Jonathan Lang wrote:
: Note that the problem extends past accessors: a role's methods can access
: its attributes directly.  So:
: 
:   role A {has Cat $.x; method m1 {return $.x;};}
:   role B {has Dog $.x; method m2 {return $.x;};}
:   class Foo {does Cat; does Dog;}
:   my Foo $bar;
:   $bar.m1;     # returns $A::x, right?
:   $bar.m2;     # returns $B::x, right?
: 
: If the two $.x's are completely equivelent, you end up with redundant data
: storage.  

Actually, it'd blow up at composition time anyway, since there's a default
readonly accessor for each $.x variable.
: 
: Then again, this may be more of a quirk than a problem...

I'd like to think so.  But then, I thought that about a lot of Perl 5 OO...

Larry

Reply via email to