=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
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
=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.
+=over 4
-[ List each enhancement as a =item entry ]
+=item *
-=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
-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.
+=head2 Updated Modules and Pragmata
-[ Within each section, list entries as a =item entry ]
+=over 4
-=head2 New Modules and Pragmata
+=item *
-=over 4
+L<B> has been upgraded from version 1.46 to 1.47.
+
+C<< B::PMOP->precomp >> now preserves the internal UTF8 flag correctly, so
+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 *
-XXX
+L<B::Concise> has been upgraded from version 0.99 to 0.991.
-=back
+B<-debug> output now includes C<op_other> pointers.
-=head2 Updated Modules and Pragmata
+=item *
-=over 4
+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<B> has been upgraded from version 1.46 to 1.47.
+L<IO::Select> has been upgraded from version 1.21 to 1.22.
-C<< B::PMOP->precomp >> now preserves the internal UTF8 flag correctly, so
-chr 256 remains chr 256, instead of turning into "\xc4\x80". This allows
-L<B::Deparse> to deparse Unicode regular expression correctly.
-[perl #120182]
+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 *
=item *
+L<PerlIO::scalar> has been upgraded from version 0.17 to 0.18.
+
+A bug fix in 0.17 caused references to be stringified as soon as a handle
+to it was opened, even if it was opened only for reading. It also croaked
+on read-only references. This has been fixed. [perl #119529]
+
+=item *
+
L<Tie::StdHandle> has been upgraded from version 4.3 to 4.4.
It no longer prints C<$\> twice. [perl #120202]
+It no longer ignores the offset passed to C<syswrite>.
+
=back
-=head2 Removed Modules and Pragmata
+=head1 Documentation
+
+=head2 Changes to Existing Documentation
=over 4
=item *
-XXX
+L<perlhacktips> has been updated to include some more examples of C<gdb> usage.
+
+=item *
+
+L<perlfunc>:
+
+C<each>, clarify hash "modify while iterating".
+
+C<pack>, the documentation for verbatim tables has been clarified.
+
+=item *
+
+L<perlre>, the documentation for C</x> and C<(?# comment)> has been expanded and clarified.
+
+=item *
+
+L<perllexwarn>, a note has been added to users of C<FATAL> warnings of the risk of upgrades.
=back
-=head1 Documentation
+=head1 Diagnostics
-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 Changes to Existing Diagnostics
-=head2 New Documentation
+=over 4
-XXX Changes which create B<new> files in F<pod/> go here.
+=item *
-=head3 L<XXX>
+L<%%s[%s] in scalar context better written as $%s[%s]|perldiag/"%%s[%s] in scalar context better written as $%s[%s]">:
-XXX Description of the purpose of the new file here
+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]".
-=head2 Changes to Existing Documentation
+=item *
+
+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.
-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.
+=back
-=head3 L<XXX>
+=head1 Testing
=over 4
=item *
-XXX Description of the change here
+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
-=head1 Diagnostics
+=head1 Platform Support
-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 Platforms
-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 Synology
-XXX Newly added diagnostic messages go under here, separated into New Errors
-and New Warnings
+Synology ships its NAS boxes with a lean Linux distribution (DSM) on relative
+cheap CPU's (like the Marvell Kirkwood mv6282 - ARMv5tel or Freescale QorIQ
+P1022 ppc - e500v2) not meant for workstations or development. These boxes
+should build now. The basic problems are the non-standard location for tools.
+
+=back
-=head3 New Errors
+=head2 Platform-Specific Notes
=over 4
-=item *
+=item Windows
+
+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.
-XXX L<message|perldiag/"message">
+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
+C<nmake -f Makefile.ce all>.
+
+Support for building with EVC (Embedded Visual C++) 4 has been restored. Perl
+can also be built using Smart Devices for Visual C++ 2005 or 2008.
=back
-=head3 New Warnings
+=head1 Internal Changes
=over 4
=item *
-XXX L<message|perldiag/"message">
+Compiling with C<-Accflags=-PERL_BOOL_AS_CHAR> now allows C99 and C++
+compilers to emulate the aliasing of C<bool> to C<char> that perl does for
+C89 compilers. [perl #120314]
=back
-=head2 Changes to Existing Diagnostics
-
-XXX Changes (i.e. rewording) of diagnostic messages go here
+=head1 Selected Bug Fixes
=over 4
=item *
-XXX Describe change here
+Perl 5.18.0 accidentally disallowed C<-bareword> under C<use strict> and
+C<use integer>. This has been fixed. [perl #120288]
-=back
+=item *
-=head1 Utility Changes
+C<-a> at the start of a line (or a hyphen with any single letter that is
+not a filetest operator) no longer produces an erroneous 'Use of "-a"
+without parentheses is ambiguous' warning. [perl #120288]
-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>.
+=item *
-[ 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. ]
+Lvalue context is now properly propagated into bare blocks and C<if> and
+C<else> blocks in lvalue subroutines. Previously, arrays and hashes would
+sometimes incorrectly be flattened when returned in lvalue list context, or
+"Bizarre copy" errors could occur. [perl #119797]
-=head3 L<XXX>
+=item *
-=over 4
+Lvalue context is now propagated to the branches of C<||> and C<&&> (and
+their alphabetic equivalents, C<or> and C<and>). This means
+C<foreach (pos $x || pos $y) {...}> now allows C<pos> to be modified
+through $_.
=item *
-XXX
+C<*DB::DB = sub {} if 0> no longer stops Perl's debugging mode from finding
+C<DB::DB> subs declared thereafter.
-=back
+=item *
-=head1 Configuration and Compilation
+C<stat> and C<readline> remember the last handle used; the former
+for the special C<_> filehandle, the latter for C<${^LAST_FH}>.
+C<eval "*foo if 0"> where *foo was the last handle passed to C<stat>
+or C<readline> could cause that handle to be forgotten if the
+handle were not opened yet. This has been fixed.
-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.
+=item *
-[ List changes as a =item entry ].
+Various cases of C<delete $::{a}>, C<delete $::{ENV}> etc. causing a crash
+have been fixed. [perl #54044]
-=over 4
+=item *
+
+Assigning another typeglob to C<*^R> no longer makes the regular expression
+engine crash.
=item *
-XXX
+C<%{'_<...'}> hashes now set breakpoints on the corresponding C<@{'_<...'}>
+rather than whichever array C<@DB::dbline> is aliased to. [perl #119799]
-=back
+=item *
-=head1 Testing
+Setting C<$!> to EACCESS before calling C<require> could affect
+C<require>'s behaviour. This has been fixed.
+
+=item *
-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.
+The "Can't use \1 to mean $1 in expression" warning message now only occurs
+on the right-hand (replacement) part of a substitution. Formerly it could
+happen in code embedded in the left-hand side, or in any other quote-like
+operator.
-[ List each test improvement as a =item entry ]
+=item *
-=over 4
+The C<\N> regular expression escape, when used without the curly braces (to
+mean C<[^\n]>), was ignoring a following C<*> if followed by whitespace
+under /x. It had been this way since C<\N> to mean C<[^\n]> was introduced
+in 5.12.0.
=item *
-XXX
+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 Platform Support
+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.
-=head2 New Platforms
+=item *
-=over 4
+An undefined lexical sub used as an inherited method no longer crashes.
-=item Synology
+=item *
-Synology ships its NAS boxes with a lean Linux distribution (DSM) on relative
-cheap CPU's (like the Marvell Kirkwood mv6282 - ARMv5tel or Freescale QorIQ
-P1022 ppc - e500v2) not meant for workstations or development. These boxes
-should build now. The basic problems are the non-standard location for tools.
+C<< $x->{key} >> where $x was declared as C<my Class $x> no longer crashes
+if a Class::FIELDS subroutine stub has been declared.
-=back
+=item *
-=head2 Discontinued Platforms
+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.
-XXX List any platforms that this version of perl no longer compiles on.
+=item *
-=over 4
+That compile-time field checking also applies now to the C<%$obj{'key'}>
+syntax, added recently in Perl 5.19.4.
-=item XXX-some-platform
+=item *
-XXX
+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.
-=back
+=item *
-=head2 Platform-Specific Notes
+Declaring a subroutine stub named NEGATIVE_INDICES no longer makes negative
+array indices crash when the current package is a tied array class.
-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.
+=item *
-=over 4
+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 Windows
+=item *
-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.
+Aliasing CORE::GLOBAL:: functions to constants stopped working in Perl 5.10
+but has now been fixed.
-=item WinCE
+=item *
-Perl can now be built in one shot with no user intervention on WinCE by running
-C<nmake -f Makefile.ce all>.
+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]
-Support for building with EVC (Embedded Visual C++) 4 has been restored. Perl
-can also be built using Smart Devices for Visual C++ 2005 or 2008.
+=item *
-=back
+C<<<`...`> here-docs (with backticks as the delimiters) now call
+C<readpipe> overrides. [perl #119827]
-=head1 Internal Changes
+=item *
-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.
+The presence of a lexical sub named "CORE" no longer stops the CORE::
+prefix from working.
-[ List each change as a =item entry ]
+=item *
-=over 4
+C<&CORE::exit()> and C<&CORE::die()> now respect L<vmsish> hints.
=item *
-XXX
+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.
-=back
+=item *
-=head1 Selected Bug Fixes
+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.
-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>.
+=item *
-[ List each fix as a =item entry ]
+C<s///>, C<tr///> and C<y///> now work when a wide character is used as the
+delimiter. [perl #120463]
-=over 4
+=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 *
-XXX
+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 *
-C<-a> at the start of a line (or a hyphen with any single letter that is
-not a filetest operator) no longer produces an erroneous 'Use of "-a"
-without parentheses is ambiguous' warning. [perl #120288]
+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 Known Problems
-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.
-
-[ List each fix as a =item entry ]
-
=over 4
=item *
-Perl 5.18.0 accidentally disallowed C<-bareword> under C<use strict> and
-C<use integer>. This has been fixed. [perl #120288]
+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 Obituary
-
-XXX If any significant core contributor has died, we've added a short obituary
-here.
-
=head1 Acknowledgements
XXX Generate this with: