In role Enumeration§

See primary documentation in context for method key.

An Enumeration property.

enum Norse-gods <Þor Oðin Freija>;
say Freija.key; # OUTPUT: «Freija␤»

In X::Syntax::NegatedPair§

See primary documentation in context for method key.

Returns the key of the pair that caused the error.

In Pair§

See primary documentation in context for method key.

multi method key(Pair:D:)

Returns the key part of the Pair.

my $p = (Raku => "d");
say $p.key; # OUTPUT: «Raku␤»