diff options
author | Ricardo Signes <rjbs@cpan.org> | 2016-03-10 19:24:33 -0500 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2016-04-10 19:37:51 -0400 |
commit | 3ffc03028fd877f956529c203e459a37cefd1c0e (patch) | |
tree | a1ee87ec17cdf5f34fcf45c5758f0025e919c0db | |
parent | c1e1945767c8b2852182772f7596407e92233e6e (diff) | |
download | perl-3ffc03028fd877f956529c203e459a37cefd1c0e.tar.gz |
perldelta: merge in changes from perl5232delta
-rw-r--r-- | Porting/perl5240delta.pod | 211 |
1 files changed, 211 insertions, 0 deletions
diff --git a/Porting/perl5240delta.pod b/Porting/perl5240delta.pod index d9a4427e32..9ecfa5a0db 100644 --- a/Porting/perl5240delta.pod +++ b/Porting/perl5240delta.pod @@ -62,6 +62,20 @@ that are used as format fields, widths, and vector separators). =head1 Incompatible Changes +=head2 Nested declarations are now disallowed + +A C<my>, C<our>, or C<state> declaration is no longer allowed inside +of another C<my>, C<our>, or C<state> declaration. + +For example, these are now fatal: + + my ($x, my($y)); + our (my $x); + +L<[perl #125587]|https://rt.perl.org/Ticket/Display.html?id=125587> + +L<[perl #121058]|https://rt.perl.org/Ticket/Display.html?id=121058> + =head2 The C</\C/> character class has been removed. This regular expression character class was deprecated in v5.20.0 and has @@ -100,6 +114,53 @@ a scalar argument) has been deemed unsuccessful. It has now been removed; trying to use the feature (or to disable the C<experimental::autoderef> warning it previously triggered) now yields an exception. +=head1 Deprecations + +=head2 sysread(), syswrite(), recv() and send() are deprecated on +:utf8 handles + +The sysread(), recv(), syswrite() and send() operators +are deprecated on handles that have the C<:utf8> layer, either +explicitly, or implicitly, eg., with the C<:encoding(UTF-16LE)> layer. + +Both sysread() and recv() currently use only the C<:utf8> flag for the +stream, ignoring the actual layers. Since sysread() and recv() do no +UTF-8 validation they can end up creating invalidly encoded scalars. + +Similarly, syswrite() and send() use only the C<:utf8> flag, otherwise +ignoring any layers. If the flag is set, both write the value UTF-8 +encoded, even if the layer is some different encoding, such as the +example above. + +Ideally, all of these operators would completely ignore the C<:utf8> +state, working only with bytes, but this would result in silently +breaking existing code. To avoid this a future version of perl will +throw an exception when any of sysread(), recv(), syswrite() or send() +are called on handle with the C<:utf8> layer. + +=head1 Performance Enhancements + +=over 4 + +=item * + +Creating Perl debugger data structures (see L<perldebguts/"Debugger Internals">) +for XSUBs and const subs has been removed. This removed one glob/scalar combo +for each unique C<.c> file that XSUBs and const subs came from. On startup +(C<perl -e"0">) about half a dozen glob/scalar debugger combos were created. +Loading XS modules created more glob/scalar combos. These things were created +regardless if the perl debugger was being used or not, unlike for pure perl +subs, and ignores that the perl debugger can not debug C code. + +=item * + +Single arguments in list assign are now slightly faster: + + ($x) = (...); + (...) = ($x); + +=back + =head1 Modules and Pragmata =head2 Updated Modules and Pragmata @@ -243,6 +304,116 @@ exports anything. [perl #125410] =back +=head1 Documentation + +=head2 Changes to Existing Documentation + +=head3 L<perlpolicy> + +=over 4 + +=item * + +This note has been added to perlpolicy: + + While civility is required, kindness is encouraged; if you have any doubt + about whether you are being civil, simply ask yourself, "Am I being kind?" + and aspire to that. + +=back + +=head3 L<perlvar> + +=over 4 + +=item * + +Use of C<$OLD_PERL_VERSION> is now discouraged. + +=back + +=head1 Diagnostics + +The following additions or changes have been made to diagnostic output, +including warnings and fatal error messages. For the complete list of +diagnostic messages, see L<perldiag>. + +=head2 New Diagnostics + +=head3 New Errors + +=over 4 + +=item * + +L<Can't redeclare "%s" in "%s"|perldiag/"Can't redeclare "%s" in "%s""> + +(F) A "my", "our" or "state" declaration was found within another declaration, +such as C<my ($x, my($y), $z)> or C<our (my $x)>. + +=back + +=head3 New Warnings + +=over 4 + +=item * + +L<%s() is deprecated on :utf8 handles|perldiag/"%s() is deprecated on :utf8 handles"> + +(W deprecated) The sysread(), recv(), syswrite() and send() operators +are deprecated on handles that have the C<:utf8> layer, either +explicitly, or implicitly, eg., with the C<:encoding(UTF-16LE)> layer. + +Both sysread() and recv() currently use only the C<:utf8> flag for the +stream, ignoring the actual layers. Since sysread() and recv() do no +UTF-8 validation they can end up creating invalidly encoded scalars. + +Similarly, syswrite() and send() use only the C<:utf8> flag, otherwise +ignoring any layers. If the flag is set, both write the value UTF-8 +encoded, even if the layer is some different encoding, such as the +example above. + +Ideally, all of these operators would completely ignore the C<:utf8> +state, working only with bytes, but this would result in silently +breaking existing code. To avoid this a future version of perl will +throw an exception when any of sysread(), recv(), syswrite() or send() +are called on handle with the C<:utf8> layer. + +=back + +=head2 Changes to Existing Diagnostics + +=over 4 + +=item * + +The diagnostic C<< Hexadecimal float: internal error >> has been changed to +C<< Hexadecimal float: internal error (%s) >> to include more information. + +=back + +=head1 Configuration and Compilation + +=over 4 + +=item * + +F<Configure> should handle spaces in paths a little better. + +=back + +=head1 Testing + +=over 4 + +=item * + +A new test (F<t/op/aassign.t>) has been added to test the list assignment operator +C<OP_AASSIGN>. + +=back + =head1 Platform Support =head2 Platform-Specific Notes @@ -283,6 +454,20 @@ C<truncate($filename, $size)> now works for files over 4GB in size. =back +=head1 Internal Changes + +=over 4 + +=item * + +C<PL_sawalias> and C<GPf_ALIASED_SV> have been removed. + +=item * + +C<GvASSIGN_GENERATION> and C<GvASSIGN_GENERATION_set> have been removed. + +=back + =head1 Selected Bug Fixes =over 4 @@ -330,6 +515,32 @@ C<alarm()> and C<sleep()> will now warn if the argument is a negative number and return undef. Previously they would pass the negative value to the underlying C function which may have set up a timer with a surprising value. +=item * + +Perl can again be compiled with any Unicode version. This used to +(mostly) work, but was lost in v5.18 through v5.20. The property +C<Name_Alias> did not exist prior to Unicode 5.0. L<Unicode::UCD> +incorrectly said it did. This has been fixed. + +=item * + +Very large code-points (beyond Unicode) in regular expressions no +longer cause a buffer overflow in some cases when converted to UTF-8. +L<[perl #125826]|https://rt.perl.org/Ticket/Display.html?id=125826> + +=item * + +The integer overflow check for the range operator (...) in list +context now correctly handles the case where the size of the range is +larger than the address space. This could happen on 32-bits with +-Duse64bitint. +L<[perl #125781]|https://rt.perl.org/Ticket/Display.html?id=125781> + +=item * + +A crash with C<< %::=(); J->${\"::"} >> has been fixed. +L<[perl #125541]|https://rt.perl.org/Ticket/Display.html?id=125541> + =back =head1 Acknowledgements |