Hi Dave,

On 01/14/2016 07:47 AM, Dave Rolsky (via RT) wrote:
# New Ticket Created by  Dave Rolsky
# Please include the string:  [perl #127263]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=127263 >


If I do a get errors like:

Method object coerced to string (please use .gist or .perl to do that)  in any 
can at gen/moar/m-Metamodel.nqp line 1109
Method object coerced to string (please use .gist or .perl to do that)  in any 
can at gen/moar/m-Metamodel.nqp line 1114
Method object coerced to string (please use .gist or .perl to do that)  in any 
can at gen/moar/m-Metamodel.nqp line 1115
Method object coerced to string (please use .gist or .perl to do that)  in any 
can at gen/moar/m-Metamodel.nqp line 1114
Method object coerced to string (please use .gist or .perl to do that)  in any 
can at gen/moar/m-Metamodel.nqp line 1115
Method object coerced to string (please use .gist or .perl to do that)  in any 
can at gen/moar/m-Metamodel.nqp line 1114
Method object coerced to string (please use .gist or .perl to do that)  in any 
can at gen/moar/m-Metamodel.nqp line 1114

I find it a bit surprising that this doesn't work. I'm not sure if this is 
intentional or not.

The documentation at
https://doc.perl6.org/routine/can calls the parameter $method-name and talks about method names, not Method object. Why does it surprise you that you when you pass in something that's not a method name, you get weird behavior?

Please also read the disclaimers at https://doc.perl6.org/language/mop#Power%2C_Convenience_and_Pitfalls

Cheers,
Moritz

Reply via email to