This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta - Documentation and Diagnostics
[perl5.git] / pod / perldelta.pod
index 6dfb854..41fbe50 100644 (file)
@@ -5,15 +5,15 @@
 [ this is a template for a new perldelta file.  Any text flagged as XXX needs
 to be processed before release. ]
 
-perldelta - what is new for perl v5.31.4
+perldelta - what is new for perl v5.31.5
 
 =head1 DESCRIPTION
 
-This document describes differences between the 5.31.3 release and the 5.31.4
+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.2, first read
-L<perl5313delta>, which describes differences between 5.31.2 and 5.31.3.
+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 Notice
 
@@ -27,15 +27,6 @@ here, but most should go in the L</Performance Enhancements> section.
 
 [ List each enhancement as a =head2 entry ]
 
-=head2 Now can dump compiled patterns before optimization
-
-This is primarily useful for tracking down bugs in the regular
-expression compiler.  This dump happens on C<-DDEBUGGING> perls, if you
-specify C<-Drv> on the command line; or on any perl if the pattern is
-compiled within the scope of S<C<use re qw(Debug DUMP_PRE_OPTIMIZE)>> or
-S<C<use re qw(Debug COMPILE EXTRA)>>.  (All but the 2nd case display
-other information as well.)
-
 =head1 Security
 
 XXX Any security-related notices go here.  In particular, any security
@@ -54,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.
@@ -104,64 +113,71 @@ XXX
 
 =head1 Modules and Pragmata
 
-XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
-go here.  If Module::CoreList is updated, generate an initial draft of the
-following sections using F<Porting/corelist-perldelta.pl>.  A paragraph summary
-for important changes should then be added by hand.  In an ideal world,
-dual-life modules would have a F<Changes> file that could be cribbed.
+=head2 Updated Modules and Pragmata
 
-The list of new and updated modules is modified automatically as part of
-preparing a Perl release, so the only reason to manually add entries here is if
-you're summarising the important changes in the module update. (Also, if the
-manually-added details don't match the automatically-generated ones, the
-release manager will have to investigate the situation carefully.)
+=over 4
 
-[ Within each section, list entries as an =item entry ]
+=item *
 
-=head2 New Modules and Pragmata
+L<B> has been upgraded from version 1.76 to 1.77.
 
-=over 4
+=item *
+
+L<B::Deparse> has been upgraded from version 1.49 to 1.50.
 
 =item *
 
-XXX Remove this section if not applicable.
+L<Devel::PPPort> has been upgraded from version 3.55 to 3.54.
 
-=back
+=item *
 
-=head2 Updated Modules and Pragmata
+L<Digest::MD5> has been upgraded from version 2.55 to 2.55_01.
 
-=over 4
+=item *
+
+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<XXX> has been upgraded from version A.xx to B.yy.
+L<ExtUtils::CBuilder> has been upgraded from version 0.280232 to 0.280233.
 
-If there was something important to note about this change, include that here.
+=item *
 
-=back
+L<Math::BigInt> has been upgraded from version 1.999816 to 1.999817_01.
 
-=head2 Removed Modules and Pragmata
+=item *
 
-=over 4
+L<Math::BigInt::FastCalc> has been upgraded from version 0.5008 to 0.5009.
 
 =item *
 
-XXX
+L<Module::CoreList> has been upgraded from version 5.20190920 to 5.20191020.
 
-=back
+=item *
 
-=head1 Documentation
+L<Safe> has been upgraded from version 2.40 to 2.41.
+
+=item *
+
+L<threads> has been upgraded from version 2.22 to 2.23.
+
+=item *
 
-XXX Changes to files in F<pod/> go here.  Consider grouping entries by
-file and be sure to link to the appropriate page, e.g. L<perlfunc>.
+L<Time::HiRes> has been upgraded from version 1.9763 to 1.9764.
 
-=head2 New Documentation
+=item *
 
-XXX Changes which create B<new> files in F<pod/> go here.
+L<XS::APItest> has been upgraded from version 1.03 to 1.04.
 
-=head3 L<XXX>
+If there was something important to note about this change, include that here.
 
-XXX Description of the purpose of the new file here
+=back
+
+=head1 Documentation
 
 =head2 Changes to Existing Documentation
 
@@ -169,65 +185,69 @@ 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>.
 
-XXX Changes which significantly change existing files in F<pod/> go here.
-However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
-section.
-
-Additionally, the following selected changes have been made:
-
-=head3 L<XXX>
+=head3 L<perlguts>
 
 =over 4
 
 =item *
 
-XXX Description of the change here
+Details of the various stacks within the perl interpreter are now explained
+here.
 
 =back
 
-=head1 Diagnostics
+Additionally, the following selected changes have been made:
 
-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>.
+=head3 URLs have been changed to https://, stale links updated
 
-XXX New or changed warnings emitted by the core's C<C> code go here.  Also
-include any changes in L<perldiag> that reconcile it to the C<C> code.
+=over 4
 
-=head2 New Diagnostics
+=item *
 
-XXX Newly added diagnostic messages go under here, separated into New Errors
-and New Warnings
+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>.
 
-=head3 New Errors
+=item *
 
-=over 4
+Some links to OS/2 libraries, Address Sanitizer and other system tools
+had gone stale. These have been updated with working links.
 
 =item *
 
-XXX L<message|perldiag/"message">
+Some links to old mails on perl5-porters had gone stale. These have been
+updated with working links.
 
 =back
 
-=head3 New Warnings
-
-=over 4
+=head1 Diagnostics
 
-=item *
+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>.
 
-XXX L<message|perldiag/"message">
+=head2 Changes to Existing Diagnostics
 
-=back
+=over 4
 
-=head2 Changes to Existing Diagnostics
+=item *
 
-XXX Changes (i.e. rewording) of diagnostic messages go here
+L<Can't use global %s in %s|perldiag/"Can't use global %s in %s">
 
-=over 4
+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 *
 
-XXX Describe change here
+L<Constants from lexical variables potentially modified elsewhere are no longer permitted|perldiag/"Constants from lexical variables potentially modified elsewhere are no longer permitted">
+
+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).
 
 =back
 
@@ -263,7 +283,18 @@ L</Platform Support> section, instead.
 
 =item *
 
-XXX
+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.  [perl #133495]
+
+=item *
+
+Documentation and hints for building perl on Z/OS (native EBCDIC) have
+been updated. Still work in progress.
+
+=item *
+
+New probe for malloc_usable_size
 
 =back
 
@@ -339,9 +370,9 @@ L</Modules and Pragmata> section.
 
 =over 4
 
-=item XXX-some-platform
+=item Windows
 
-XXX
+Support for building perl with Visual C++ 6.0 has now been removed.
 
 =back
 
@@ -357,7 +388,19 @@ well.
 
 =item *
 
-XXX
+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 *
+
+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 5.26.  Details are in
+L<perldeprecation/In XS code, use of various macros dealing with UTF-8.>
 
 =back
 
@@ -372,11 +415,7 @@ files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
 
 =item *
 
-Perl no longer treats strings starting with "0x" or "0b" as hex or
-binary numbers respectively when converting a string to a number.
-This reverts a change in behaviour inadvertently introduced in perl
-5.30.0 intended to improve precision when converting a string to a
-floating point number. [perl #134230]
+XXX
 
 =back
 
@@ -416,13 +455,13 @@ died, add a short obituary here.
 
 XXX Generate this with:
 
-  perl Porting/acknowledgements.pl v5.31.3..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.
+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