We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated from rt.perl.org#115618 (status was 'open')
Searchable as RT115618$
The text was updated successfully, but these errors were encountered:
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.
Sorry, something went wrong.
On Tue Nov 06 13:09:28 2012, supernovus wrote:
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.
The workaround, btw, is to re-compose the inherited class - this works, e.g:
use MONKEY-TYPING; augment class Any { method foo { say "hello world"; } }
Str.^compose;
-- Will "Coke" Coleda
The RT System itself - Status changed from 'new' to 'open'
No branches or pull requests
Migrated from rt.perl.org#115618 (status was 'open')
Searchable as RT115618$
The text was updated successfully, but these errors were encountered: