We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0eedb0e commit 4c703bbCopy full SHA for 4c703bb
doc/Language/create-cli.rakudoc
@@ -500,6 +500,11 @@ If no multi candidate of C<MAIN> is found for the given command line
500
parameters, the sub C<USAGE> is called. If no such method is found,
501
the compiler will output a default usage message.
502
503
+In the following example, we print a custom usage message via
504
+a L<Q string|/language/quoting>
505
+(with the C<:c|/language/quoting#Heredocs:_:to> flag enabling interpolation of curly braces,
506
+and the C<:to|/language/quoting#Heredocs:_:to> flag for stating it all as a heredoc):
507
+
508
#|(is it the answer)
509
multi MAIN(Int $i) { say $i == 42 ?? 'answer' !! 'dunno' }
510
#|(divide two numbers)
0 commit comments