|
09:39
sibl joined
10:19
david7832 joined
10:33
sibl left
|
|||
| david7832 | In the TWEAK and BUILD submethods of a subclass, how can I access attributes of the parent class? I can't seem to find a way by experimenting with `self.` and the FQN. | 10:40 | |
| My specific use case: I want to inherit from Math:Matrix to build a subclass (Möbius transformations) of 2x2 Complex matrices with nonzero determinant that also have a CALL-ME method (so that `subset` seems not to be an option). | |||
| (Using the trait `handles` instead of inheritance would of course be an alternative here, but I also have a general interest in this.) | |||
| lizmat | sub classes can only access public attributes through the accessor interface | 10:48 | |
| m: class A { has $.a = 42 }; class B is A { method b() { $.a } }; say B.new.a | |||
| 42 | |||
| hmmm.. looks like we lost both camelia and evallabla | |||
| *evallable | |||
| david7832 | thanks, that helps. So it all comes down to what the parent class exposes. | 11:05 | |
|
11:39
david7832 left
12:17
sibl joined
12:38
sibl left,
sibl joined
|
|||