Skip to content

Commit

Permalink
perldiag: Rewrap an entry for better splain output
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Father Chrysostomos committed Aug 13, 2016
1 parent dca6023 commit 4c9eaea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pod/perldiag.pod
Original file line number Diff line number Diff line change
Expand Up @@ -2742,9 +2742,9 @@ either consume text or fail.
=item Initialization of state variables in list context currently forbidden

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

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

Expand Down

0 comments on commit 4c9eaea

Please sign in to comment.