Hey guys,
I ran into some really strange behavior with method modifiers.
package Parent;
around qr/^[A-Z][a-z]/ => sub {..};
package Child;
extends Parent;
sub Foo{...};
Everything works as advertised for Parent's methods. The Child's
methods do not get the method modifier.
Changing regex to qr/[A=Z]/ does cause the modifier to be visited
multiple times. Of course, there is no way to tell which method is
being modified, so I don't know if it is being visited on Foo() or
just on BUILD() and similar methods.
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.
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!
Thanks,
Kate