This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Release engineering work on perldelta
[perl5.git] / pod / perldelta.pod
index 550fc9b..1003f92 100644 (file)
@@ -2,9 +2,6 @@
 
 =head1 NAME
 
-[ 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.19.6
 
 =head1 DESCRIPTION
@@ -15,44 +12,19 @@ release.
 If you are upgrading from an earlier release such as 5.19.4, first read
 L<perl5195delta>, which describes differences between 5.19.4 and 5.19.5.
 
-=head1 Notice
-
-XXX Any important notices here
-
 =head1 Core Enhancements
 
-XXX New core language features go here.  Summarize user-visible core language
-enhancements.  Particularly prominent performance optimisations could go
-here, but most should go in the L</Performance Enhancements> section.
-
-[ List each enhancement as a =head2 entry ]
-
-=head1 Security
-
-XXX Any security-related notices go here.  In particular, any security
-vulnerabilities closed should be noted here rather than in the
-L</Selected Bug Fixes> section.
+=head2 $a and $b warnings exemption
 
-[ List each security issue as a =head2 entry ]
-
-=head1 Incompatible Changes
-
-XXX For a release on a stable branch, this section aspires to be:
-
-    There are no changes intentionally incompatible with 5.XXX.XXX
-    If any exist, they are bugs, and we request that you submit a
-    report.  See L</Reporting Bugs> below.
-
-[ List each incompatible change as a =head2 entry ]
+The special variables $a and $b, used in C<sort>, are now exempt from "used
+once" warnings, even where C<sort> is not used.  This makes it easier for
+CPAN modules to provide functions using $a and $b for similar purposes.
+[perl #120462]
 
 =head1 Deprecations
 
-XXX Any deprecated features, syntax, modules etc. should be listed here.
-
 =head2 Module removals
 
-XXX Remove this section if inapplicable.
-
 The following modules will be removed from the core distribution in a
 future release, and will at that time need to be installed from CPAN.
 Distributions on CPAN which require these modules will need to list them as
@@ -73,45 +45,27 @@ not usually on concerns over their design.
 
 =back
 
-[ List each other deprecation as a =head2 entry ]
-
 =head1 Performance Enhancements
 
-XXX Changes which enhance performance without changing behaviour go here.
-There may well be none in a stable release.
-
-[ List each enhancement as a =item entry ]
-
 =over 4
 
 =item *
 
-XXX
-
-=back
-
-=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>, which prints stub
-entries to STDOUT.  Results can be pasted in place of the '=head2' entries
-below.  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.
-
-[ Within each section, list entries as a =item entry ]
-
-=head2 New Modules and Pragmata
-
-=over 4
+Constant hash key lookups (C<$hash{key}> as opposed to C<$hash{$key}>) have
+long had the internal hash value computed at compile time, to speed up
+lookup.  This optimisation has only now been applied to hash slices as
+well.
 
 =item *
 
-XXX
+Combined C<and> and C<or> operators in void context, like those
+generated for C<< unless ($a && $b) >> and C<< if ($a || b) >> now
+short circuit directly to the end of the statement. [perl #120128]
 
 =back
 
+=head1 Modules and Pragmata
+
 =head2 Updated Modules and Pragmata
 
 =over 4
@@ -125,6 +79,9 @@ chr 256 remains chr 256, instead of turning into "\xc4\x80".  This allows
 L<B::Deparse> to deparse Unicode regular expression correctly.
 [perl #120182]
 
+C<< B::HV->ARRAY >> now preserves the UTF8 flag on returned hash keys.
+[perl #120535]
+
 =item *
 
 L<B::Concise> has been upgraded from version 0.99 to 0.991.
@@ -138,6 +95,26 @@ L<B::Deparse> has been upgraded from version 1.23 to 1.24.
 C<s//\(3)/e> is now deparsed in a way that does not issue warnings when
 parsed again.  [perl #119807]
 
+C<glob(my $x)> is now deparsed correctly, rather than as C<< <my $x> >> or
+similar.
+
+C<CORE::glob> is now deparsed correctly with the CORE:: prefix when there
+is a subroutine named "glob".
+
+=item *
+
+L<IO::Select> has been upgraded from version 1.21 to 1.22.
+
+Removing a closed file handle from an IO::Select object now correctly
+updates its internal state and returns the correct value.  [perl #75156]
+
+=item *
+
+L<Locale::Maketext> has been upgraded from version 1.24 to 1.25.
+
+An issue with escaped backslashes if the literal is compiled as
+function argument has been resolved.
+
 =item *
 
 L<Module::CoreList> has been upgraded from version 3.00 to 3.01.
@@ -162,142 +139,66 @@ It no longer ignores the offset passed to C<syswrite>.
 
 =back
 
-=head2 Removed Modules and Pragmata
-
-=over 4
-
-=item *
-
-XXX
-
-=back
-
 =head1 Documentation
 
-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>.
-
-=head2 New Documentation
-
-XXX Changes which create B<new> files in F<pod/> go here.
-
-=head3 L<XXX>
-
-XXX Description of the purpose of the new file here
-
 =head2 Changes to Existing Documentation
 
-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.
-
-=head3 L<XXX>
-
 =over 4
 
 =item *
 
-XXX Description of the change here
-
-=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>.
-
-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.
-
-=head2 New Diagnostics
-
-XXX Newly added diagnostic messages go under here, separated into New Errors
-and New Warnings
-
-=head3 New Errors
-
-=over 4
+L<perlhacktips> has been updated to include some more examples of C<gdb> usage.
 
 =item *
 
-XXX L<message|perldiag/"message">
-
-=back
+L<perlfunc>:
 
-=head3 New Warnings
+C<each>, clarify hash "modify while iterating".
 
-=over 4
+C<pack>, the documentation for verbatim tables has been clarified.
 
 =item *
 
-XXX L<message|perldiag/"message">
-
-=back
-
-=head2 Changes to Existing Diagnostics
-
-XXX Changes (i.e. rewording) of diagnostic messages go here
-
-=over 4
+L<perlre>, the documentation for C</x> and C<(?# comment)> has been expanded and clarified.
 
 =item *
 
-XXX Describe change here
+L<perllexwarn>, a note has been added to users of C<FATAL> warnings of the risk of upgrades.
 
 =back
 
-=head1 Utility Changes
-
-XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
-Most of these are built within the directories F<utils> and F<x2p>.
-
-[ List utility changes as a =head3 entry for each utility and =item
-entries for each change
-Use L<XXX> with program names to get proper documentation linking. ]
+=head1 Diagnostics
 
-=head3 L<XXX>
+=head2 Changes to Existing Diagnostics
 
 =over 4
 
 =item *
 
-XXX
-
-=back
-
-=head1 Configuration and Compilation
+L<%%s[%s] in scalar context better written as $%s[%s]|perldiag/"%%s[%s] in scalar context better written as $%s[%s]">:
 
-XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
-go here.  Any other changes to the Perl build process should be listed here.
-However, any platform-specific changes should be listed in the
-L</Platform Support> section, instead.
-
-[ List changes as a =item entry ].
-
-=over 4
+This warning now occurs for any C<%array[$index]> or C<%hash{key}> known to
+be in scalar context at compile time.  Previously it was worded "Scalar
+value %%s[%s] better written as $%s[%s]".
 
 =item *
 
-XXX
+L<Switch condition not recognized in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Switch condition not recognized in regex; marked by <-- HERE in m/%s/">:
+
+The description for this diagnostic has been extended to cover all cases where the warning may occur.
+Issues with the positioning of the arrow indicator have also been resolved.
 
 =back
 
 =head1 Testing
 
-XXX Any significant changes to the testing of a freshly built perl should be
-listed here.  Changes which create B<new> files in F<t/> go here as do any
-large changes to the testing harness (e.g. when parallel testing was added).
-Changes to existing files in F<t/> aren't worth summarizing, although the bugs
-that they represent may be covered elsewhere.
-
-[ List each test improvement as a =item entry ]
-
 =over 4
 
 =item *
 
-XXX
+F<ext/File-Find/t/find.t> has been converted from manual C<print>
+statements to Test::More functions.  Each test now has a description.
+[perl #120503]
 
 =back
 
@@ -316,25 +217,8 @@ should build now. The basic problems are the non-standard location for tools.
 
 =back
 
-=head2 Discontinued Platforms
-
-XXX List any platforms that this version of perl no longer compiles on.
-
-=over 4
-
-=item XXX-some-platform
-
-XXX
-
-=back
-
 =head2 Platform-Specific Notes
 
-XXX List any changes for specific platforms.  This could include configuration
-and compilation changes or changes in portability/compatibility.  However,
-changes within modules for platforms should generally be listed in the
-L</Modules and Pragmata> section.
-
 =over 4
 
 =item Windows
@@ -343,6 +227,10 @@ Support for building with Visual C++ 2013 has been added.  There are currently
 two possible test failures (see L<perlwin32/"Testing Perl on Windows">) which
 will hopefully be resolved soon.
 
+Experimental support for building with Intel C++ Compiler has been added. Only
+the nmake makefile (win32/Makefile) can be used. A "nmake test" will not pass
+at this time due to "cpan/CGI/t/url.t".
+
 =item WinCE
 
 Perl can now be built in one shot with no user intervention on WinCE by running
@@ -355,12 +243,6 @@ can also be built using Smart Devices for Visual C++ 2005 or 2008.
 
 =head1 Internal Changes
 
-XXX Changes which affect the interface available to C<XS> code go here.  Other
-significant internal changes for future core maintainers should be noted as
-well.
-
-[ List each change as a =item entry ]
-
 =over 4
 
 =item *
@@ -373,11 +255,6 @@ C89 compilers.  [perl #120314]
 
 =head1 Selected Bug Fixes
 
-XXX Important bug fixes in the core language are summarized here.  Bug fixes in
-files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
-
-[ List each fix as a =item entry ]
-
 =over 4
 
 =item *
@@ -458,28 +335,129 @@ Blessing into a reference (C<bless $thisref, $thatref>) has long been
 disallowed, but magical scalars for the second like C<$/> and those tied
 were exempt.  They no longer are.  [perl #119809]
 
-=back
+=item *
 
-=head1 Known Problems
+Blessing into a reference was accidentally allowed in 5.18 if the class
+argument were a blessed reference with stale method caches (i.e., whose
+class had had subs defined since the last method call).  They are
+disallowed once more, as in 5.16.
+
+=item *
 
-XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
-tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
-platform specific bugs also go here.
+An undefined lexical sub used as an inherited method no longer crashes.
 
-[ List each fix as a =item entry ]
+=item *
 
-=over 4
+C<< $x->{key} >> where $x was declared as C<my Class $x> no longer crashes
+if a Class::FIELDS subroutine stub has been declared.
+
+=item *
+
+C<@$obj{'key'}> and C<${$obj}{key}> used to be exempt from compile-time
+field checking ("No such class field"; see L<fields>) but no longer are.
+
+=item *
+
+That compile-time field checking also applies now to the C<%$obj{'key'}>
+syntax, added recently in Perl 5.19.4.
+
+=item *
+
+A nonexistent array element with a large index passed to a subroutine that
+ties the array and then tries to access the element no longer results in a
+crash.
+
+=item *
+
+Declaring a subroutine stub named NEGATIVE_INDICES no longer makes negative
+array indices crash when the current package is a tied array class.
 
 =item *
 
-XXX
+Declaring a C<require>, C<glob>, or C<do> subroutine stub in the
+CORE::GLOBAL:: package no longer makes compilation of calls to the
+corresponding functions crash.
+
+=item *
+
+Aliasing CORE::GLOBAL:: functions to constants stopped working in Perl 5.10
+but has now been fixed.
+
+=item *
+
+When C<`...`> or C<qx/.../> calls a C<readpipe> override, double-quotish
+interpolation now happens, as is the case when there is no override.
+Previously, the presence of an override would make these quote-like
+operators act like C<q{}>, suppressing interpolation.  [perl #115330]
+
+=item *
+
+C<<<`...`> here-docs (with backticks as the delimiters) now call
+C<readpipe> overrides.  [perl #119827]
+
+=item *
+
+The presence of a lexical sub named "CORE" no longer stops the CORE::
+prefix from working.
+
+=item *
+
+C<&CORE::exit()> and C<&CORE::die()> now respect L<vmsish> hints.
+
+=item *
+
+Undefining a glob that triggers a DESTROY method that undefines the same
+glob is now safe.  It used to produce "Attempt to free unreferenced glob
+pointer" warnings and leak memory.
+
+=item *
+
+If subroutine redefinition (C<eval 'sub foo{}'> or C<newXS> for XS code)
+triggers a DESTROY method on the sub that is being redefined, and that
+method assigns a subroutine to the same slot (C<*foo = sub {}>), C<$_[0]>
+is no longer left pointing to a freed scalar.  Now DESTROY is delayed until
+the new subroutine has been installed.
+
+=item *
+
+C<s///>, C<tr///> and C<y///> now work when a wide character is used as the
+delimiter.  [perl #120463]
+
+=item *
+
+On Windows, perl no longer calls CloseHandle() on a socket handle.  This makes
+debugging easier on Windows by removing certain irrelevant bad handle
+exceptions.  It also fixes a race condition that made socket functions randomly
+fail in a Perl process with multiple OS threads, and possible test failures in
+F<dist/IO/t/cachepropagate-tcp.t>.  [perl #120091/118059]
+
+=item *
+
+Some cases of unterminated (?...) sequences in regular expressions (e.g.,
+C</(?</>) have been fixed to produce the proper error message instead of
+"panic: memory wrap".  Other cases (e.g., C</(?(/>) have yet to be fixed.
+
+=item *
+
+Strange vars like ties, overloads, or stringified refs (and in recent
+perls, pure NOK vars) would generally do the wrong thing in formats
+when the var is treated as a string and repeatedly chopped, as in
+^<<<~~ and similar. This has now been resolved.
 
 =back
 
-=head1 Obituary
+=head1 Known Problems
+
+=over 4
+
+=item *
 
-XXX If any significant core contributor has died, we've added a short obituary
-here.
+C<do CORE()> used to call a sub named "CORE" and treat its return value as
+a file name to execute.  A bug fix inadvertently caused it to be
+interpreted as the deprecated "do-SUB" construct.  (Yes, C<do
+I<bareword>()> is inconsistent.)  This will likely be changed back.
+
+=back
 
 =head1 Acknowledgements