Skip to content

Commit 9ca6a17

Browse files
committed
Changes to sentence case refs #2223 and eliminates non-current comment
1 parent 54200d0 commit 9ca6a17

File tree

1 file changed

+36
-38
lines changed

1 file changed

+36
-38
lines changed

doc/Language/variables.pod6

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The container type can be set with C<is> in a declaration.
7575
For information on variables without sigils, see
7676
L<sigilless variables|#Sigilless variables>.
7777
78-
=head2 Item and List Assignment
78+
=head2 Item and list assignment
7979
8080
There are two types of variable assignment, I<item assignment> and I<list
8181
assignment>. Both use the equal sign C<=> as operator. The syntax of the
@@ -193,7 +193,7 @@ only depends on the C<$>.
193193
194194
=end table
195195
196-
=head2 The C<*> Twigil
196+
=head2 The C<*> twigil
197197
X<|$*>
198198
199199
This twigil is used for dynamic variables which are looked up through the caller's, not through the outer,
@@ -256,7 +256,7 @@ boolean context before using it for anything else:
256256
Dynamic variables can have lexical scope when declared with C<my> or package scope when declared with C<our>. Dynamic resolution and resolution through symbol tables introduced with C<our> are two orthogonal issues.
257257
258258
259-
=head2 The C<?> Twigil
259+
=head2 The C<?> twigil
260260
X<|$?>
261261
262262
Compile-time variables may be addressed via the C<?> twigil. They are known
@@ -270,7 +270,7 @@ example for this is:
270270
For a list of these special variables, see
271271
L<compile-time variables|/language/variables#Compile-time_variables>.
272272
273-
=head2 The C<!> Twigil
273+
=head2 The C<!> twigil
274274
X<|$!>
275275
276276
L<Attributes|/language/objects#Attributes> are variables that exist per instance
@@ -293,7 +293,7 @@ you though. For more details on objects, classes and their attributes see
293293
L<object orientation|/language/objects>.
294294
295295
296-
=head2 The C<.> Twigil
296+
=head2 The C<.> twigil
297297
X<|$.>
298298
299299
The C<.> twigil isn't really for variables at all. In fact, something along
@@ -326,13 +326,13 @@ is also possible:
326326
For more details on objects, classes and their attributes and methods see
327327
L<object orientation|/language/objects>.
328328
329-
=head2 The C<^> Twigil
329+
=head2 The C<^> twigil
330330
X<|$^>
331331
332-
The C<^> twigil declares a formal positional parameter to blocks or
333-
subroutines. Variables of the form C<$^variable> are a type of placeholder
334-
variable. They may be used in bare blocks to declare formal parameters to
335-
that block. So the block in the code
332+
The C<^> twigil declares a formal positional parameter to blocks or subroutines;
333+
that is, variables of the form C<$^variable> are a type of placeholder variable.
334+
They may be used in bare blocks to declare formal parameters to that block. So
335+
the block in the code
336336
337337
my @powers-of-three = 1,3,9…100;
338338
say reduce { $^b - $^a }, 0, |@powers-of-three;
@@ -362,7 +362,7 @@ Placeholder variables cannot have type constraints or a variable name with a
362362
single upper-case letter (this is disallowed to enable catching some
363363
Perl5-isms).
364364
365-
=head2 The C<:> Twigil
365+
=head2 The C<:> twigil
366366
X<|$:>
367367
368368
The C<:> twigil declares a formal named parameter to a block or subroutine.
@@ -376,7 +376,7 @@ therefore not ordered using Unicode order, of course). So this:
376376
377377
See L<^> for more details about placeholder variables.
378378
379-
=head2 The C<=> Twigil
379+
=head2 The C<=> twigil
380380
X<|$=>
381381
382382
The C<=> twigil is used to access Pod variables. Every Pod block in the
@@ -400,7 +400,7 @@ hierarchical data structure through C<$=pod>.
400400
Note that all those C<$=someBlockName> support the C<Positional> and the
401401
C<Associative> roles.
402402
403-
=head2 The C<~> Twigil
403+
=head2 The C<~> twigil
404404
X<|$~>
405405
406406
The C<~> twigil is for referring to sublanguages (called slangs). The
@@ -426,7 +426,7 @@ augment slang Regex { # derive from $~Regex and then modify $~Regex
426426
}
427427
=end code
428428
429-
=head1 Variable Declarators and Scope
429+
=head1 Variable declarators and scope
430430
431431
Most of the time it's enough to create a new variable using the C<my>
432432
keyword:
@@ -457,7 +457,7 @@ predefined variables:
457457
temp Restores a variable's value at the end of scope
458458
let Restores a variable's value at the end of scope if the block exits unsuccessfully
459459
460-
=head2 The C<my> Declarator
460+
=head2 The C<my> declarator
461461
462462
Declaring a variable with C<my> gives it lexical scope. This means it only
463463
exists within the current block. For example:
@@ -520,7 +520,7 @@ variable using L<the * twigil|#The_*_Twigil>. This twigil makes the compiler loo
520520
C<my> is the default scope for subroutines, so C<my sub x() {}> and
521521
C<sub x() {}> do exactly the same thing.
522522
523-
=head2 The C<our> Declarator
523+
=head2 The C<our> declarator
524524
525525
C<our> variables work just like C<my> variables, except that they also
526526
introduce an alias into the symbol table.
@@ -573,7 +573,7 @@ To skip elements in the list use the anonymous state variable C<$>.
573573
say [$a, %h].perl;
574574
# OUTPUT: «["b", {:th(1)}]␤»
575575
576-
=head2 The C<has> Declarator
576+
=head2 The C<has> declarator
577577
578578
C<has> scopes attributes to instances of a class or role, and methods to
579579
classes or roles. C<has> is implied for methods, so C<has method x() {}>
@@ -582,7 +582,7 @@ and C<method x() {}> do the same thing.
582582
See L<object orientation|/language/objects> for more documentation and some
583583
examples.
584584
585-
=head2 The C<anon> Declarator
585+
=head2 The C<anon> declarator
586586
587587
The C<anon> declarator prevents a symbol from getting installed in the lexical
588588
scope, the method table and everywhere else.
@@ -597,7 +597,7 @@ but still aren't installed in a scope:
597597
say %operations<square>.name; # square
598598
say %operations<square>(8); # 64
599599
600-
=head2 The C<state> Declarator
600+
=head2 The C<state> declarator
601601
602602
C<state> declares lexically scoped variables, just like C<my>. However,
603603
initialization happens exactly once the first time the initialization
@@ -671,7 +671,7 @@ State variables are shared between all threads. The result can be unexpected.
671671
# many other more or less odd variations can be produced
672672
673673
X<|anon state variables>X<|nameless variables>X<|$ (variable)>
674-
=head3 The C<$> Variable
674+
=head3 The C<$> variable
675675
676676
In addition to explicitly declared named state variables, C<$> can be used
677677
as an anonymous state variable without an explicit C<state> declaration.
@@ -719,7 +719,7 @@ subset DynInt where $ = ::('Int'); # the initializer will be called for each typ
719719
subset DynInt where state $ = ::('Int'); # the initializer is called once, this is a proper cache
720720
=end code
721721
722-
=head3 The C<@> Variable
722+
=head3 The C<@> variable
723723
724724
Similar to the C<$> variable, there is also a L<Positional>
725725
anonymous state variable C<@>.
@@ -754,7 +754,7 @@ to do anything useful with it.
754754
As with C<$>, each mention of C<@> in a scope introduces a new anonymous
755755
array.
756756
757-
=head3 The C<%> Variable
757+
=head3 The C<%> variable
758758
759759
In addition, there's an L<Associative> anonymous state variable C<%>.
760760
@@ -786,7 +786,7 @@ access is also possible (with copying to make it useful).
786786
As with the other anonymous state variables, each mention of C<%> within a
787787
given scope will effectively introduce a separate variable.
788788
789-
=head2 The C<augment> Declarator
789+
=head2 The C<augment> declarator
790790
791791
With C<augment>, you can add attributes and methods to existing classes and
792792
grammars, provided you activated the C<MONKEY-TYPING> pragma first.
@@ -805,7 +805,7 @@ are better solutions.
805805
(In this case, the better solution would be to use a
806806
L<function|/language/functions>).
807807
808-
=head2 The C<temp> Prefix
808+
=head2 The C<temp> prefix
809809
810810
Like C<my>, C<temp> restores the old value of a variable at the end of its
811811
scope. However, C<temp> does not create a new variable.
@@ -841,7 +841,7 @@ scope. However, C<temp> does not create a new variable.
841841
# </g>
842842
# </g>␤»
843843
844-
=head2 The C<let> Prefix
844+
=head2 The C<let> prefix
845845
846846
Restores the previous value if the block exits unsuccessfully. A
847847
successful exit means the block returned a defined value or a list.
@@ -864,9 +864,7 @@ stay as 84 because the block returns a defined value (C<say> returns
864864
true). Otherwise the C<die> statement will cause the block to exit
865865
unsuccessfully, resetting the answer to 42.
866866
867-
=comment this is duplicated in operators.pod
868-
869-
=head1 Type Constraints and Initialization
867+
=head1 Type constraints and initialization
870868
871869
Variables have a type constraint via the L<container|/language/containers> they
872870
are bound to, which goes between the declarator and the variable name. The
@@ -902,7 +900,7 @@ re-applied by assigning C<Nil> to it:
902900
$product = Nil;
903901
say $product; # OUTPUT: «1␤»
904902
905-
=head2 Default Defined Variables Pragma
903+
=head2 Default defined variables pragma
906904
907905
To force all variables to have a L<definitness|/language/mop#index-entry-syntax_DEFINITE-DEFINITE>
908906
constraint, use the pragma C<use variables :D>. The pragma is lexically scoped and can be
@@ -931,7 +929,7 @@ As the name suggests, this pragma applies only to variables. To effect
931929
the same behaviour on parameters, use the C<use parameters :D> pragma
932930
(currently NYI in Rakudo).
933931
934-
=head1 Special Variables
932+
=head1 Special variables
935933
936934
Perl 6 attempts to use long, descriptive names for special
937935
variables. There are only three special variables that are extra
@@ -952,7 +950,7 @@ There are three special variables that are available in every block:
952950
=end table
953951
954952
X<|topic variable>
955-
=head3 The C<$_> Variable
953+
=head3 The C<$_> variable
956954
957955
C<$_> is the topic variable. It's the default parameter for blocks that do
958956
not have an explicit signature, so constructs like C<for @array { ... }> and
@@ -985,7 +983,7 @@ work on C<$_>:
985983
# ij*␤»
986984
987985
X<|match variable>
988-
=head3 The C<$/> Variable
986+
=head3 The C<$/> variable
989987
990988
C<$/> is the match variable. It stores the result of the last
991989
L<Regex|/language/regexes>
@@ -1015,7 +1013,7 @@ say $/;
10151013
# textnode => 「some text」␤»
10161014
=end code
10171015
1018-
=head4 X«Positional Attributes|variable,$0;variable,$1;variable,@()»
1016+
=head4 X«Positional attributes|variable,$0;variable,$1;variable,@()»
10191017
10201018
C<$/> can have positional attributes if the L<Regex|/language/regexes> had
10211019
capture-groups in it, which are just formed with parentheses.
@@ -1034,7 +1032,7 @@ C<@()> can be used.
10341032
10351033
say @().join; # OUTPUT: «bbbbbdddddeff␤»
10361034
1037-
=head4 X«Named Attributes|variable,$<named>;variable,%()»
1035+
=head4 X«Named attributes|variable,$<named>;variable,%()»
10381036
10391037
C<$/> can have named attributes if the L<Regex|/language/regexes> had named
10401038
capture-groups in it, or if the Regex called out to another Regex.
@@ -1054,7 +1052,7 @@ be used.
10541052
say %().join; # OUTPUT: «"punctuation ....final-word see?"␤»
10551053
10561054
X<|error variable>
1057-
=head3 The C<$!> Variable
1055+
=head3 The C<$!> variable
10581056
10591057
C<$!> is the error variable. If a C<try> block or statement prefix catches
10601058
an exception, that exception is stored in C<$!>. If no exception was caught,
@@ -1162,7 +1160,7 @@ C<:bin> will be set on the L<IO::ArgFiles> object.
11621160
Arguments from the command line.
11631161
11641162
X<|$*IN>X<|$*OUT>X<|$*ERR>
1165-
=head3 Special Filehandles: STDIN, STDOUT and STDERR
1163+
=head3 Special filehandles: C<STDIN>, C<STDOUT> and C<STDERR>
11661164
11671165
For more information about special filehandles please see also the L<Input and
11681166
Output|/language/io> page and the L<IO::Special> class. L<IO::Handle> contains
@@ -1178,7 +1176,7 @@ Standard output filehandle, AKA I<STDOUT>.
11781176
=item C<$*ERR>
11791177
Standard error filehandle, AKA I<STDERR>.
11801178
1181-
=head3 Runtime Environment
1179+
=head3 Runtime environment
11821180
X<|%*ENV>
11831181
=item C<%*ENV>
11841182
Environment variables;
@@ -1323,7 +1321,7 @@ default changed before using them:
13231321
13241322
This behavior is not tested in the spec tests and is subject to change.
13251323
1326-
=head1 Naming Conventions
1324+
=head1 Naming conventions
13271325
13281326
It is helpful to know our naming conventions in order to understand what codes
13291327
do directly. However, there is not yet a conventions list covering anywhere.

0 commit comments

Comments
 (0)