This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta tidy-ups
[perl5.git] / pod / perldelta.pod
index 1e17157..d413c6b 100644 (file)
@@ -2,15 +2,35 @@
 
 =head1 NAME
 
-perldelta - what is new for perl v5.31.2
+perldelta - what is new for perl v5.31.5
 
 =head1 DESCRIPTION
 
-This document describes differences between the 5.31.1 release and the 5.31.2
+This document describes differences between the 5.31.4 release and the 5.31.5
 release.
 
-If you are upgrading from an earlier release such as 5.31.0, first read
-L<perl5311delta>, which describes differences between 5.31.0 and 5.31.1.
+If you are upgrading from an earlier release such as 5.31.3, first read
+L<perl5314delta>, which describes differences between 5.31.3 and 5.31.4.
+
+=head1 Incompatible Changes
+
+=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 modifiable 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.
+
+L<[perl #131138]|https://rt.perl.org/Ticket/Display.html?id=131138>.
 
 =head1 Modules and Pragmata
 
@@ -20,193 +40,206 @@ L<perl5311delta>, which describes differences between 5.31.0 and 5.31.1.
 
 =item *
 
-L<Devel::PPPort> has been upgraded from version 3.53 to 3.54.
+L<B> has been upgraded from version 1.76 to 1.77.
 
 =item *
 
-L<Exporter> has been upgraded from version 5.73 to 5.74.
+L<B::Deparse> has been upgraded from version 1.49 to 1.50.
 
 =item *
 
-L<IPC::Cmd> has been upgraded from version 1.02 to 1.04.
+L<Devel::PPPort> has been upgraded from version 3.55 to 3.54.
 
 =item *
 
-L<JSON::PP> has been upgraded from version 4.02 to 4.04.
+L<Digest::MD5> has been upgraded from version 2.55 to 2.55_01.
 
 =item *
 
-L<Module::CoreList> has been upgraded from version 5.20190620 to 5.20190720.
+L<Dumpvalue> has been upgraded from version 1.18 to 1.21.
+
+Previously, when dumping elements of an array and encountering an undefined
+value, the string printed would have been C<empty array>.  This has been
+changed to what was apparently originally intended:  C<empty slot>.
 
 =item *
 
-L<Opcode> has been upgraded from version 1.43 to 1.44.
+L<ExtUtils::CBuilder> has been upgraded from version 0.280232 to 0.280233.
 
 =item *
 
-L<PerlIO::encoding> has been upgraded from version 0.27 to 0.28.
+L<Math::BigInt> has been upgraded from version 1.999816 to 1.999817_01.
 
 =item *
 
-L<Pod::Simple> has been upgraded from version 3.38 to 3.39.
+L<Math::BigInt::FastCalc> has been upgraded from version 0.5008 to 0.5009.
 
 =item *
 
-L<threads::shared> has been upgraded from version 1.60 to 1.61.
+L<Module::CoreList> has been upgraded from version 5.20190920 to 5.20191020.
 
-=back
-
-=head1 Diagnostics
+=item *
 
-=head2 New Diagnostics
+L<Safe> has been upgraded from version 2.40 to 2.41.
 
-=head3 New Errors
+=item *
 
-=over 4
+L<threads> has been upgraded from version 2.22 to 2.23.
 
 =item *
 
-C<L<No digits found for %s literal|perldiag/"No digits found for %s literal">>
+L<Time::HiRes> has been upgraded from version 1.9763 to 1.9764.
+
+=item *
 
-(F) No hexadecimal digits were found following C<0x> or no binary digits were
-found following C<0b>.
+L<XS::APItest> has been upgraded from version 1.03 to 1.04.
 
 =back
 
-=head2 Changes to Existing Diagnostics
+=head1 Documentation
+
+=head2 Changes to Existing Documentation
+
+We have attempted to update the documentation to reflect the changes listed in
+this document.  If you find any we have missed, send email to
+L<perlbug@perl.org|mailto:perlbug@perl.org>.
+
+=head3 L<perlguts>
 
 =over 4
 
 =item *
 
-C<\N{} here is restricted to one character> is now emitted in the same
-circumstances where previously C<\N{} in inverted character class or as
-a range end-point is restricted to one character> was.
-
-This is due to new circumstances having been added in perl v5.30 that
-weren't covered by the earlier wording.
+Details of the various stacks within the perl interpreter are now explained
+here.
 
 =back
 
-=head1 Configuration and Compilation
+Additionally, the following selected changes have been made:
+
+=head3 URLs have been changed to https:// and stale links have been updated
 
 =over 4
 
 =item *
 
-The C<ECHO> macro is now defined.  This is used in a C<dtrace> rule
-that was originally changed for FreeBSD, and the FreeBSD make
-apparently predefines it.  The Solaris make does not predefine C<ECHO>
-which broke this rule on Solaris.  [perl #134218]
+Where applicable, the URLs in the documentation have been moved from using the
+http:// protocol to https:// .  This also affects the location of the bug
+tracker at L<https://rt.perl.org>.
+
+=item *
+
+Some links to OS/2 libraries, Address Sanitizer and other system tools had gone
+stale.  These have been updated with working links.
 
 =item *
 
-Bison versions 3.1 through 3.4 are now supported.
+Some links to old mails on perl5-porters had gone stale.  These have been
+updated with working links.
 
 =back
 
-=head1 Platform Support
+=head1 Diagnostics
 
-=head2 Platform-Specific Notes
+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 Changes to Existing Diagnostics
 
 =over 4
 
-=item Linux
+=item *
+
+L<Can't use global %s in %s|perldiag/"Can't use global %s in %s">
 
-C<cc> will be used to populate C<plibpth> if C<cc> is C<clang>.  [perl
-#134189]
+This error message has been slightly reformatted from the original C<Can't use
+global %s in "%s">, and in particular misleading error messages like C<Can't
+use global $_ in "my"> are now rendered as C<Can't use global $_ in subroutine
+signature>.
 
-=item VMS
+=item *
+
+L<Constants from lexical variables potentially modified elsewhere are no longer permitted|perldiag/"Constants from lexical variables potentially modified elsewhere are no longer permitted">
 
-C<-Duse64bitint> is now the default on VMS.
+This error message replaces the former C<Constants from lexical variables
+potentially modified elsewhere are deprecated.  This will not be allowed in Perl
+5.32> to reflect the fact that this previously deprecated usage has now been
+transformed into an exception.  The message's classification has also been
+updated from D (deprecated) to F (fatal).
+
+See also L</Incompatible Changes>.
 
 =back
 
-=head1 Internal Changes
+=head1 Configuration and Compilation
 
 =over 4
 
 =item *
 
-The PERL_DESTRUCT_LEVEL environment variable was formerly only honored on
-perl binaries built with DEBUGGING support. It is now checked on all perl
-builds. Its normal use is to force perl to individually free every block
-of memory which it has allocated before exiting, which is useful when
-using automated leak detection tools such as valgrind.
+Perl now no longer probes for C<d_u32align>, defaulting to C<define> on all
+platforms.  This check was error prone when it was done, which was on 32-bit
+platforms only.
+L<[perl #133495]|https://rt.perl.org/Ticket/Display.html?id=133495>.
 
 =item *
 
-The API eval_sv() now accepts a C<G_RETHROW> flag.  If this flag is
-set and an exception is thrown while compiling or executing the
-supplied code, it will be rethrown, and eval_sv() will not return.
-[perl #134177]
+Documentation and hints for building perl on Z/OS (native EBCDIC) have been
+updated.  Still work in progress.
 
 =item *
 
-As part of the fix for [perl #2754] perl_parse() now returns non-zero
-if exit(0) is called in a C<BEGIN>, C<UNITCHECK> or C<CHECK> block.
+A new probe for C<malloc_usable_size> has been added.
 
-=item *
+=back
 
-Most functions which recursively walked an op tree during compilation have been
-made non-recursive.  This avoids SEGVs from stack overflow when the op tree is
-deeply nested, such as C<$n == 1 ? "one" : $n == 2 ? "two" : ....> (especially
-in code which is auto-generated).
+=head1 Testing
 
-This is particularly noticeable where the code is compiled within a separate
-thread, as threads tend to have small stacks by default.
+Tests were added and changed to reflect the other additions and changes in this
+release.
 
-=back
+=head1 Platform Support
 
-=head1 Selected Bug Fixes
+=head2 Platform-Specific Notes
 
 =over 4
 
-=item *
-
-Parsing incomplete hex or binary literals was changed in 5.31.1 to
-treat such a literal as just the 0, leaving the following C<x> or C<b>
-to be parsed as part of the next token.  This could lead to some
-silent changes in behaviour, so now incomplete hex or binary literals
-produce a fatal error.  [perl #134125]
+=item Windows
 
-=item *
-
-eval_pv()'s I<croak_on_error> flag will now throw even if the
-exception is a false overloaded value.  [perl #134177]
+=over 4
 
 =item *
 
-C<INIT> blocks and the program itself are no longer run if exit(0) is
-called within a C<BEGIN>, C<UNITCHECK> or C<CHECK> block.  [perl
-#2754]
+Support for building perl with Visual C++ 6.0 has now been removed.
 
 =item *
 
-C<<< open my $fh, ">>+", undef >>> now opens the temporary file in
-append mode - writes will seek to the end of file before writing.
-[perl #134221]
-
-=item *
+Building perl with Visual C++ 2013 and earlier was broken in the previous
+release but has now been fixed.
 
-Fixed a SEGV when searching for the source of an uninitialized value warning on
-an op whose subtree includes an OP_MULTIDEREF.
-[perl #134275]
+=back
 
 =back
 
-=head1 Known Problems
+=head1 Internal Changes
 
 =over 4
 
 =item *
 
-The VC++ 6.0 build on Windows is currently broken.
+Added the C<<PL_curstackinfo->si_cxsubix>> field.  This records the stack index
+of the most recently pushed sub/format/eval context.  It is set and restored
+automatically by C<cx_pushsub()>, C<cx_popsub()> etc., but would need to be
+manually managed if you do any unusual manipulation of the context stack.
 
 =item *
 
-Tests 9-11 in F<t/op/blocks.t> currently fail on Windows.
-[perl #134295]
+Various macros dealing with character type classification and changing case
+where the input is encoded in UTF-8 now require an extra parameter to prevent
+potential reads beyond the end of the buffer.  Use of these has generated a
+deprecation warning since Perl 5.26.  Details are in
+L<perldeprecation/In XS code, use of various macros dealing with UTF-8.>
 
 =back
 
@@ -214,13 +247,13 @@ Tests 9-11 in F<t/op/blocks.t> currently fail on Windows.
 
 XXX Generate this with:
 
-  perl Porting/acknowledgements.pl v5.31.1..HEAD
+  perl Porting/acknowledgements.pl v5.31.4..HEAD
 
 =head1 Reporting Bugs
 
-If you find what you think is a bug, you might check the perl bug database
-at L<https://rt.perl.org/>.  There may also be information at
-L<http://www.perl.org/>, the Perl Home Page.
+If you find what you think is a bug, you might check the perl bug database at
+L<https://rt.perl.org/>.  There may also be information at
+L<https://www.perl.org/>, the Perl Home Page.
 
 If you believe you have an unreported bug, please run the L<perlbug> program
 included with your release.  Be sure to trim your bug down to a tiny but
@@ -229,13 +262,13 @@ will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
 
 If the bug you are reporting has security implications which make it
 inappropriate to send to a publicly archived mailing list, then see
-L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
-for details of how to report the issue.
+L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> for details of how to
+report the issue.
 
 =head1 Give Thanks
 
-If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
-you can do so by running the C<perlthanks> program:
+If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you
+can do so by running the C<perlthanks> program:
 
     perlthanks