I originally thought that $var.^methods gave you a list of all
available methods on $var, but it looks like it doesn't (always?)
report on inherited methods.
my $stringy = '3.14159';
say $stringy.^name;
# Str
say $stringy.^mro;
# ((Str) (Cool) (Any) (Mu))
The list returned from checking
Thanks! Both of these are workable, but the ^mro (method
resolution order, I presume) is closer to what I wanted just now:
my $stringy = 'abc';
say $stringy.^name;
# Str
say $stringy.^parents(:all);
# ((Cool) (Any) (Mu))
say $stringy.^mro;
# ((Str) (Cool) (Any)