@@ -56,7 +56,8 @@ declaration of the variable. Assuming we have a C<FailHash> class:
56
56
class FailHash is Hash {
57
57
has Bool $!final = False;
58
58
multi method AT-KEY ( ::?CLASS:D: Str:D \key ){
59
- fail X::OutOfRange.new(:what("Hash key"), :got(key), :range(self.keys)) if $!final && !self.EXISTS-KEY(key);
59
+ fail X::OutOfRange.new(:what("Hash key"), :got(key),
60
+ :range(self.keys)) if $!final && !self.EXISTS-KEY(key);
60
61
callsame # still not final, so do normal action from Hash
61
62
}
62
63
@@ -94,8 +95,8 @@ Item assignment places the value from the right-hand side into the variable
94
95
95
96
List assignment leaves the choice of what to do to the variable on the left.
96
97
97
- For example, L < Array|/type/Array > variables (C < @ > sigil) empty themselves on list
98
- assignment and then put all the values from the right-hand side into
98
+ For example, L < Array|/type/Array > variables (C < @ > sigil) empty themselves on
99
+ list assignment and then put all the values from the right-hand side into
99
100
themselves.
100
101
101
102
The type of assignment (item or list) is decided by the first context
@@ -799,7 +800,8 @@ array.
799
800
800
801
= head3 The C < % > variable
801
802
802
- In addition, there's an L < Associative|/type/Associative > anonymous state variable C < % > .
803
+ In addition, there's an L < Associative|/type/Associative > anonymous state
804
+ variable C < % > .
803
805
804
806
sub foo($x) {
805
807
say (%).push($x => $x);
@@ -932,7 +934,8 @@ L<of|/type/Variable#trait_of> to set a type constraint.
932
934
my Int $x = 42;
933
935
$x = 'a string';
934
936
CATCH { default { put .^name, ': ', .Str } }
935
- # OUTPUT: «X::TypeCheck::Assignment: Type check failed in assignment to $x; expected Int but got Str ("a string")»
937
+ # OUTPUT: «X::TypeCheck::Assignment: Type check failed in assignment to $x;
938
+ expected Int but got Str ("a string")»
936
939
937
940
If a scalar variable has a type constraint but no initial value, it's
938
941
initialized with the type object of the default value of the container it's
@@ -961,8 +964,9 @@ re-applied by assigning C<Nil> to it:
961
964
962
965
= head2 Default defined variables pragma
963
966
964
- To force all variables to have a L < definiteness|/language/mop#index-entry-syntax_DEFINITE-DEFINITE >
965
- constraint, use the pragma C < use variables :D > . The pragma is lexically scoped and can be
967
+ To force all variables to have a
968
+ L < definiteness|/language/mop#index-entry-syntax_DEFINITE-DEFINITE > constraint,
969
+ use the pragma C < use variables :D > . The pragma is lexically scoped and can be
966
970
switched off with C < use variables :_ > .
967
971
968
972
= begin code :skip-test<compile-time error>
@@ -1267,7 +1271,7 @@ for examples and more context.
1267
1271
1268
1272
= head4 C < @*ARGS >
1269
1273
1270
- C < @*ARGS > contains the arguments from the command line.
1274
+ C < @*ARGS > is an array of C < Str > containing the arguments from the command line.
1271
1275
1272
1276
X < |&*ARGS-TO-CAPTURE >
1273
1277
= head4 C < &*ARGS-TO-CAPTURE >
@@ -1329,8 +1333,8 @@ in your program.
1329
1333
X < |$*TZ >
1330
1334
= head4 C < $*TZ >
1331
1335
1332
- C < $*TZ > contains the system's local time zone offset, as the number of B < seconds >
1333
- from GMT.
1336
+ C < $*TZ > contains the system's local time zone offset, as the number of
1337
+ B < seconds > from GMT.
1334
1338
1335
1339
X < |$*CWD >
1336
1340
= head4 C < $*CWD >
@@ -1515,13 +1519,14 @@ C<1e-15>.
1515
1519
X < |$*THREAD >
1516
1520
= head4 C < $*THREAD >
1517
1521
1518
- Contains a L < Thread|/type/Thread > object representing the currently executing thread.
1522
+ Contains a L < Thread|/type/Thread > object representing the currently executing
1523
+ thread.
1519
1524
1520
1525
X < |$*SCHEDULER >
1521
1526
= head4 C < $*SCHEDULER >
1522
1527
1523
- This is a L < ThreadPoolScheduler|/type/ThreadPoolScheduler > object representing the current default
1524
- scheduler.
1528
+ This is a L < ThreadPoolScheduler|/type/ThreadPoolScheduler > object representing
1529
+ the current default scheduler.
1525
1530
1526
1531
By default this imposes a maximum of 64 threads on the methods C < .hyper > ,
1527
1532
C < .race > and other thread-pool classes that use that scheduler such as
0 commit comments