Skip to content

Commit 5f679e9

Browse files
committed
Update enums method description
1 parent 0c971d3 commit 5f679e9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/Type/Enumeration.pod6

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,15 @@ C<Oðin> gets 1 since it is the second in the C<enum>.
8787
=head2 method enums
8888
8989
Defined as:
90+
9091
method enums()
9192
92-
Returns the list of C<Enumeration>s for the enum type this particular
93-
C<Enumeration> is in. Works both on the enum type and any key.
93+
Returns a L<Map|/type/Map> of enum values. Works both on the enum type
94+
and any key.
9495
9596
enum Mass ( mg => 1/1000, g => 1/1, kg => 1000/1 );
96-
say g.enums; # OUTPUT: «{g => 1, kg => 1000, mg => 0.001}␤»
97+
say Mass.enums; # OUTPUT: «Map.new((g => 1, kg => 1000, mg => 0.001))␤»
98+
say g.enums; # OUTPUT: «Map.new((g => 1, kg => 1000, mg => 0.001))␤»
9799
98100
=head2 method kv
99101

0 commit comments

Comments
 (0)