In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/4c9eaea68a0c4f05bc7ac8b235c83095f53f29d1?hp=dca6023ddb16b8490f5bb9102a66b1515159ebf5>
- Log ----------------------------------------------------------------- commit 4c9eaea68a0c4f05bc7ac8b235c83095f53f29d1 Author: Father Chrysostomos <[email protected]> Date: Sat Aug 13 14:30:56 2016 -0700 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. ----------------------------------------------------------------------- Summary of changes: pod/perldiag.pod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pod/perldiag.pod b/pod/perldiag.pod index bd5039a..6d82cde 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -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] -- Perl5 Master Repository
