diff options
author | Tony Cook <tony@develop-help.com> | 2019-10-02 15:42:00 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2019-10-02 15:42:00 +1000 |
commit | 7fd0eed3ddc61ff1ab8e81d17472959868e6a87f (patch) | |
tree | cb02bcfe43aae32f64d5133b03c6daedc8dfe8d6 | |
parent | 30fc7a2809e5a175e2d9bb94d765b2039f270d91 (diff) | |
download | perl-7fd0eed3ddc61ff1ab8e81d17472959868e6a87f.tar.gz |
perldelta for 30fc7a2809e5
-rw-r--r-- | pod/perldelta.pod | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 948deda7aa..89e823867e 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -45,6 +45,24 @@ XXX For a release on a stable branch, this section aspires to be: [ List each incompatible change as a =head2 entry ] +=head2 Modifiable variables are no longer permitted in constants + +Code like: + + my $var; + $sub = sub () { $var }; + +where C<$var> is referenced elsewhere in some sort of modiable context +now produces an exception when the sub is defined. + +This error can be avoided by adding a return to the sub definition: + + $sub = sub () { return $var }; + +This has been deprecated since perl 5.22. + +[perl #131138] + =head1 Deprecations XXX Any deprecated features, syntax, modules etc. should be listed here. |