Skip to content

Commit b268f08

Browse files
committed
Additional suggestios by MasterDuke++
1 parent 9fea5ea commit b268f08

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

doc/Language/create-cli.pod6

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ Usage:
7171
hello.p6 <name>
7272
=end code
7373
74-
However, if give a default value for the parameter, running the script either
75-
with or without specifying a name will always work:
74+
However, if you give a default value for the parameter, running the script
75+
either with or without specifying a name will always work:
7676
7777
# inside file 'hello.p6'
7878
sub MAIN($name = 'bashful') {
@@ -96,9 +96,9 @@ Another way to do this, is to make sub MAIN a C<multi sub>:
9696
multi sub MAIN($name) { say "Hello $name, how are you?" }
9797
9898
Which would give the same output as the examples above. Whether you should
99-
use either method to achive the desired goal, is entirely up to you.
99+
use either method to achieve the desired goal, is entirely up to you.
100100
101-
A more complicated example using a single positional parameter, multiple
101+
A more complicated example using a single positional and multiple
102102
named parameters:
103103
104104
# inside "frobnicate.p6"
@@ -169,9 +169,10 @@ Usage:
169169
=head2 C<%*SUB-MAIN-OPTS>
170170
171171
It's possible to alter how arguments are processed before they're passed
172-
to C<sub MAIN {}> by setting options in C<%*SUB-MAIN-OPTS> hash. Due to the
173-
nature of dynamic variables, it is required to set up C<%*SUB-MAIN-OPTS>
174-
hash and fill it with the appropriate settings. For instance:
172+
to C<sub MAIN {}> by setting options in the C<%*SUB-MAIN-OPTS> hash. Due to
173+
the nature of dynamic variables, it is required to set up the
174+
C<%*SUB-MAIN-OPTS> hash and fill it with the appropriate settings.
175+
For instance:
175176
176177
my %*SUB-MAIN-OPTS =
177178
:named-anywhere, # allow named variables at any location
@@ -272,11 +273,11 @@ the compiler will output a default generated usage message.
272273
EOH
273274
}
274275
275-
The default usage message is available inside C<sub USAGE> via read-only
276+
The default usage message is available inside C<sub USAGE> via the read-only
276277
C<$*USAGE> variable. It will be generated based on available C<sub MAIN>
277-
candidates and their parameters. As shown before, You can specify additional
278-
extended description for each candidate using C<#|(...)> Pod block to set
279-
L«C<WHY>|/routine/WHY».
278+
candidates and their parameters. As shown before, you can specify an
279+
additional extended description for each candidate using a
280+
C<#|(...)> Pod block to set L«C<WHY>|/routine/WHY».
280281
281282
=end pod
282283

0 commit comments

Comments
 (0)