in reply to Re^2: Moose - two augmented methods in one class
in thread Moose - two augmented methods in one class
Actually, in the example, it does seem necessary, as it seems to hit onto a barely documented area of Moose behaviour bug according to several people in #moose in irc.perl.org. The html method defined in the superclass, calls head defined in the invocant. head isn't augmented in the subclass, so the head method defined in the superclass is used directly. This calls inner which searches up the callstack for an augmented method. While we'd want it to find head, that method is not augmented in the subclass, so it finds html instead, inadvertently using the wrong augmentation.
Try the code from the original question and you'll see.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Moose - two augmented methods in one class
by tobyink (Canon) on Jan 09, 2012 at 16:13 UTC | |
by stvn (Monsignor) on Jan 11, 2012 at 05:19 UTC | |
by tobyink (Canon) on Jan 11, 2012 at 12:04 UTC | |
by stvn (Monsignor) on Jan 12, 2012 at 02:30 UTC |