🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | log inspection situation still under development | For MoarVM see #moarvm
Set by lizmat on 22 May 2021.
Xliff \o 16:55
What's the best way to introspect all "is" trait_mods?
sena_kun Xliff, grep the scope for `trait_mod:<is>` named subroutines and then inspect their names? What do you mean in particular? 16:56
Xliff sena_kun: "grep the scope" -- elaborate, pls? 16:59
I've tried GLOBAL and MY and nothing shows. 17:00
sena_kun Xliff, for core you can do: 17:01
m: for CORE::.keys { say $_ if $_.starts-with('&trait_mod') }
camelia &trait_mod:<trusts>
&trait_mod:<hides>
&trait_mod:<is>
&trait_mod:<will>
&trait_mod:<returns>
&trait_mod:<of>
&trait_mod:<handles>
&trait_mod:<does>
Xliff Hah! sena_kun++ 17:02
sena_kun for external modules you need to `use` them in a scope and then do `for MY::.keys`.