# New Ticket Created by Timothy Totten
# Please include the string: [perl #115618]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=115618 >
If you add methods to Any, say using the "augment" feature, or the MOP, the
methods don't propagate to derived classes.
For example:
use MONKEY_TYPING;
augment class Any {
method foo {
say "hello world";
}
}
"blah".foo;
# OUTPUT: «No such method 'hello' for invocant of type 'Str' in block at
/tmp/_H_vJIBsA8:1»
I tried using Any.add_method() instead of augment, and had the same results.
The augment code above works in Niecza and it is the consensus that it
should work.