Skip to content

Commit e6a9e44

Browse files
committed
Revise discussion of 'goto' in perlfunc
ALL TESTS PASSING.
1 parent 2e23747 commit e6a9e44

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

pod/perlfunc.pod

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3726,17 +3726,14 @@ delimit its argument. C<goto("NE")."XT"> is equivalent to C<goto NEXT>.
37263726
Also, unlike most named operators, this has the same precedence as
37273727
assignment.
37283728

3729-
Use of C<goto LABEL> or C<goto EXPR> to jump into a construct is
3730-
deprecated and will issue a warning; it will become a fatal error in
3731-
Perl 5.42. While still available, it may not be used to
3732-
go into any construct that requires initialization, such as a
3733-
subroutine, a C<foreach> loop, or a C<given>
3734-
block. In general, it may not be used to jump into the parameter
3735-
of a binary or list operator, but it may be used to jump into the
3736-
I<first> parameter of a binary operator. (The C<=>
3737-
assignment operator's "first" operand is its right-hand
3738-
operand.) It also can't be used to go into a
3739-
construct that is optimized away.
3729+
Use of C<goto LABEL> or C<goto EXPR> to jump into a construct becomes an
3730+
exception in Perl 5.44; a fatal error notification is emitted. It may not be
3731+
used to go into any construct that requires initialization, such as a
3732+
subroutine, a C<foreach> loop, or a C<given> block. In general, it may not be
3733+
used to jump into the parameter of a binary or list operator, but it may be
3734+
used to jump into the I<first> parameter of a binary operator. (The C<=>
3735+
assignment operator's "first" operand is its right-hand operand.) It also
3736+
can't be used to go into a construct that is optimized away.
37403737

37413738
The C<goto &NAME> form is quite different from the other forms of
37423739
C<goto>. In fact, it isn't a goto in the normal sense at

0 commit comments

Comments
 (0)