diff options
author | David Mitchell <davem@iabyn.com> | 2018-01-19 21:11:24 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2018-01-19 21:11:24 +0000 |
commit | a8e51187c21fee8697b9299b5303d90883b1eba9 (patch) | |
tree | 9e2f87609bddba70cf7ea7d13508ebf150f8e817 | |
parent | 894f226e51fd4f80c130447477b789cd25f37574 (diff) | |
download | perl-a8e51187c21fee8697b9299b5303d90883b1eba9.tar.gz |
perldelta for signatures/attribute order flip
-rw-r--r-- | pod/perldelta.pod | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 2779f3d1d4..5c3b6b57ae 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -81,6 +81,20 @@ reverted due to the extent of the trouble caused to CPAN modules. It is expected that smartmatch will be changed again in the future, but preceded by some kind of explicit deprecation. +=head2 Subroutine attribute and signature order + +The experimental subroutine signatures feature has been changed so that +subroutine attributes must now come before the signature rather than +after. This is because attributes like C<:lvalue> can affect the +compilation of code within the signature, for example: + + sub f :lvalue ($a = do { $x = "abc"; return substr($x,0,1)}) { ...} + +Note that this the second time they have been flipped: + + sub f :lvalue ($a, $b) { 1 }; # 5.20; 5.28 onwards + sub f ($a, $b) :lvalue { 1 }; # 5.22 - 5.26 + =head1 Deprecations =head2 Use of code points over 0xFF in string bitwise operators |