Skip to content

Commit 4c9eaea

Browse files
author
Father Chrysostomos
committed
perldiag: Rewrap an entry for better splain output
In an eighty-column terminal, this is what it looked like before this commit: $ ./perl -Ilib -Mdiagnostics -E 'state ($x)=1' Initialization of state variables in list context currently forbidden at -e line 1, at EOF Execution of -e aborted due to compilation errors (#1) (F) state only permits initializing a single scalar variable, in scalar context. So state $a = 42 is allowed, but not state ($a) = 42. To apply state semantics to a hash or array, store a hash or array reference in a sca lar variable.
1 parent dca6023 commit 4c9eaea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pod/perldiag.pod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2742,9 +2742,9 @@ either consume text or fail.
27422742
=item Initialization of state variables in list context currently forbidden
27432743

27442744
(F) C<state> only permits initializing a single scalar variable, in scalar
2745-
context. So C<state $a = 42> is allowed, but not C<state ($a) = 42>. To apply
2746-
state semantics to a hash or array, store a hash or array reference in a scalar
2747-
variable.
2745+
context. So C<state $a = 42> is allowed, but not C<state ($a) = 42>. To apply
2746+
state semantics to a hash or array, store a hash or array reference in a
2747+
scalar variable.
27482748

27492749
=item %%s[%s] in scalar context better written as $%s[%s]
27502750

0 commit comments

Comments
 (0)