Skip to content

Commit cb7233b

Browse files
committed
Tweaks in headers and levels
1 parent 6a34efc commit cb7233b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

doc/Language/create-cli.pod6

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ was specified). An alternative way of generating the usage information may
3434
be provided by the developer or installed using a module.
3535
3636
X<|MAIN>
37-
=head1 sub MAIN
37+
=head2 sub MAIN
3838
3939
The sub with the special name C<MAIN> will be executed after all relevant entry
4040
phasers (C<BEGIN>, C<CHECK>, C<INIT>, C<PRE>, C<ENTER>) have been run and
@@ -169,7 +169,7 @@ Usage:
169169
=end code
170170
171171
X<%*SUB-MAIN-OPTS>
172-
=head2 %*SUB-MAIN-OPTS
172+
=head3 %*SUB-MAIN-OPTS
173173
174174
It's possible to alter how arguments are processed before they're passed
175175
to C<sub MAIN {}> by setting options in the C<%*SUB-MAIN-OPTS> hash. Due to
@@ -188,7 +188,7 @@ For instance:
188188
Available options are:
189189
190190
X<named-anywhere>
191-
=head3 named-anywhere
191+
=head4 named-anywhere
192192
193193
By default, named arguments passed to the program (i.e., C<MAIN>)
194194
cannot appear after any positional argument. However, if
@@ -201,7 +201,7 @@ $ perl6 example.p6 1 --c=2 3 --d=4
201201
=end code
202202
203203
X<hidden-from-USAGE>
204-
=head2 is hidden-from-USAGE
204+
=head3 is hidden-from-USAGE
205205
206206
Sometimes you want to exclude a MAIN candidate from being shown in any
207207
automatically generated USAGE message. This can be achieved by adding
@@ -237,7 +237,8 @@ Usage:
237237
238238
Which, although technically correct, doesn't read as well.
239239
240-
=head2 X<Unit-scoped definition of MAIN|declarator,unit (MAIN)>
240+
X<declarator,unit (MAIN)>
241+
=head2 Unit-scoped definition of MAIN
241242
242243
If the entire program body resides within C<MAIN>, you can use the C<unit>
243244
declarator as follows (adapting an earlier example):
@@ -259,7 +260,7 @@ Note that this is only appropriate if you can get by with just a single
259260
(only) sub MAIN.
260261
261262
X<|USAGE>X<|$*USAGE>
262-
=head1 sub C<USAGE>
263+
=head2 sub USAGE
263264
264265
If no multi candidate of C<MAIN> is found for the given command line
265266
parameters, the sub C<USAGE> is called. If no such method is found,
@@ -292,7 +293,7 @@ the L<Getopt|https://modules.perl6.org/search/?q=getopt> modules available
292293
in the ecosystem.
293294
294295
X<|ARGS-TO-CAPTURE>
295-
=head2 ARGS-TO-CAPTURE
296+
=head2 sub ARGS-TO-CAPTURE
296297
297298
The C<ARGS-TO-CAPTURE> subroutine should accept two parameters: a Callable
298299
representing the C<MAIN> unit to be executed (so it can be introspected if
@@ -331,7 +332,7 @@ L<Getopt|https://modules.perl6.org/search/?q=getopt> modules available in the
331332
ecosystem.
332333
333334
X<|GENERATE-USAGE>
334-
=head2 GENERATE-USAGE
335+
=head2 sub GENERATE-USAGE
335336
336337
The C<GENERATE-USAGE> subroutine should accept a Callable representing the
337338
C<MAIN> subroutine that didn't get executed because the dispatch failed.

0 commit comments

Comments
 (0)