Skip to content

Commit f476a20

Browse files
authored
Merge pull request #3469 from softmoth/patch-1
create-cli: Minor improvements to enum example
2 parents 6ecd48c + 6cfa4a3 commit f476a20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/Language/create-cli.pod6

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,23 +200,23 @@ C<Enumeration>s can be used in signatures with arguments converted
200200
automatically to its corresponding C<enum> symbol:
201201
202202
=begin code
203-
enum Flags (
203+
enum Flag (
204204
FLAG_FOO => 0b001,
205205
FLAG_BAR => 0b010,
206206
FLAG_BAZ => 0b100,
207207
);
208208
209-
sub MAIN( Enumeration $flag = FLAG_FOO) {
209+
sub MAIN(Flag $flag = FLAG_FOO) {
210210
say "Flagging $flag";
211211
}
212212
=end code
213213
214214
This will work correctly with
215215
216216
=for code :lang<text>
217-
raku MAIN-enum.p6 FLAG_BAR
217+
raku MAIN-enum.raku FLAG_BAR
218218
219-
but will die if called with something that is not an enum.
219+
but will die if called with something that is not a C<Flag>.
220220
221221
X<|%*SUB-MAIN-OPTS>
222222
=head2 %*SUB-MAIN-OPTS

0 commit comments

Comments
 (0)