You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method objects have their own `.gist` method[^1] that just print `.name`. However, under some
circumstances, that method is lost, and `Mu::gist` is used instead:
I tried to fix it and failed, but found some facts about the bug that might give a hint:
*) The problematic methods has `is nodal` trait on them (which mixes in a role), but NOT all nodal
methods have this issue
*) (90% sure this is what happened) If you add an only `method z is nodal {}` to src/core/Any.pm, the bug doesn't appear
*) If you add a `multi method z is nodal {}` to src/core/Any.pm the bug occurs
*) If you do the same thing with a regular class, it doesn't happen. BTW: `Any` is augmented in core
*) .file on the method gives src/core/Method.pm. However, if you modify Mu.gist to append some string,
you'll see that it's Mu's method that gets called.
*) Even if you make Method.gist an `only` method, the Mu::gist one is still the one that gets called
*) If you implement only or multi method `gist` in the role that `is nodal` mixed in[^2], trying to
call .gist on the buggy method gives "Cannot invoke this object (REPR: Null; VMNull)"
Migrated from rt.perl.org#132149 (status was 'new')
Searchable as RT132149$
The text was updated successfully, but these errors were encountered: