Skip to content

Commit 683b532

Browse files
committed
Eradicate "will start" from spec: it is now done with once {}
1 parent e45fc46 commit 683b532

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

S04-control.pod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,6 @@ Some of these phasers also have corresponding traits that can be set on variable
14541454
These have the advantage of passing the variable in question into
14551455
the closure as its topic:
14561456

1457-
my $r will start { .set_random_seed() };
14581457
our $h will enter { .rememberit() } will undo { .forgetit() };
14591458

14601459
Apart from C<CATCH> and C<CONTROL>, which can only occur once, most
@@ -1477,7 +1476,7 @@ clone, so separate clones can keep separate state variables:
14771476

14781477
our $i = 0;
14791478
...
1480-
$func = { state $x will start { $x = $i++ }; dostuff($i) };
1479+
$func = once { state $x { $x = $i++ }; dostuff($i) };
14811480

14821481
But C<state> automatically applies "once" semantics to any initializer,
14831482
so this also works:

0 commit comments

Comments
 (0)