On Tue, 4 May 2010, Kate Yoak wrote:

What is the intended inheritance behavior for method modifiers? Do they only modify methods in the current namespace (including those it inherits) but not any methods defined by a subclass? That's my best guess.

Method modifiers look for a method in the current class or its parents and add the modifier _in the current class_. That means that child classes are never affected.

On a related note, why don't we get the name of the method being called as an argument? ($orig contains a coderef). Boy, would that make lots of things nice!

I think the thing to do would be to pass in a Method object (which can act just like a coderef) instead of the raw underlying subroutine body.

Patches welcome, I'm sure. Join on in irc://irc.perl.org/#moose if you're interested in working on this.


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/

Reply via email to