This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for 6146d9e1c87d
[perl5.git] / pod / perldelta.pod
index 2d5a52b..f97c710 100644 (file)
 
 =head1 NAME
 
-perldelta - what is new for perl v5.23.6
+[ 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.23.7
 
 =head1 DESCRIPTION
 
-This document describes differences between the 5.23.5 release and the 5.23.6
+This document describes differences between the 5.23.6 release and the 5.23.7
 release.
 
-If you are upgrading from an earlier release such as 5.23.4, first read
-L<perl5235delta>, which describes differences between 5.23.4 and 5.23.5.
+If you are upgrading from an earlier release such as 5.23.5, first read
+L<perl5236delta>, which describes differences between 5.23.5 and 5.23.6.
 
-=head1 Incompatible Changes
+=head1 Notice
 
-=head2 Regular expression compilation errors
+XXX Any important notices here
 
-Some regular expression patterns that had runtime errors now
-don't compile at all.
+=head1 Core Enhancements
 
-This should have been in the perldelta for 5.23.4, but was omitted.
+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.
 
-Almost all Unicode properties using the C<\p{}> and C<\P{}> regular
-expression pattern constructs are now checked for validity at pattern
-compilation time, and invalid ones will cause the program to not
-compile.  In earlier releases, this check was often deferred until run
-time.  Whenever an error check is moved from run- to compile time,
-erroneous code is caught 100% of the time, whereas before it would only
-get caught if and when the offending portion actually gets executed,
-which for unreachable code might be never.
+[ List each enhancement as a =head2 entry ]
 
-=head1 Deprecations
+=head1 Security
 
-=head2 Using code points above the platform's C<IV_MAX> is now
-deprecated
-
-Unicode defines code points in the range C<0..0x10FFFF>.  Some standards
-at one time defined them up to 2**31 - 1, but Perl has allowed them to
-be as high as anything that will fit in a word on the platform being
-used.  However, use of those above the platform's C<IV_MAX> is broken in
-some constructs, notably C<tr///>, regular expression patterns involving
-quantifiers, and in some arithmetic and comparison operations, such as
-being the upper limit of a loop.  Now the use of such code points raises
-a deprecation warning, unless that warning category is turned off.
-C<IV_MAX> is typically 2**31 -1 on 32-bit platforms, and 2**63-1 on
-64-bit ones.
-
-=head2 Doing bitwise operations on strings containing code points above
-0xFF is deprecated
-
-The string bitwise operators treat their operands as strings of bytes,
-and values beyond 0xFF are nonsensical in this context.  To operate on
-encoded bytes, first encode the strings.  To operate on code points'
-numeric values, use C<split> and C<map ord>.  In the future, this
-warning will be replaced by an exception.
+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.
 
-=head1 Performance Enhancements
+[ List each security issue as a =head2 entry ]
 
-=over 4
+=head1 Incompatible Changes
 
-=item *
+XXX For a release on a stable branch, this section aspires to be:
 
-Many languages, such as Chinese, are caseless.  Perl now knows about
-most modern commercially important ones, and skips much of the work when
-a program tries to change case in them (like C<ucfirst()>) or match
-caselessly (C<qr//i>).  This will speed up a program, such as a web
-server, that can operate on multiple languages, while operating on a
-caseless one.
+    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.
 
-=back
+[ List each incompatible change as a =head2 entry ]
 
-=head1 Modules and Pragmata
+=head2 C<qr/\b{wb}/> is now tailored to Perl expectations
 
-=head2 Updated Modules and Pragmata
+This is now more suited to be a drop-in replacement for plain C<\b>, but
+giving better results for parsing natural language.  Previously it
+strictly followed the current Unicode rules which calls for it to match
+between each white space character.  Now it doesn't generally match
+within spans of white space, behaving like C<\b> does.  See
+L<perlrebackslash/\b{wb}>
 
-=over 4
+=head1 Deprecations
 
-=item *
+XXX Any deprecated features, syntax, modules etc. should be listed here.
 
-L<B::Deparse> has been upgraded from version 1.35 to 1.36.
+=head2 Module removals
 
-Uses of C<< < > >> are now always deparsed as either C<glob()> or
-C<readline()>, and uses of C<glob()> or C<readline()> are never deparsed as
-C<< < > >>. This fixes the deparsing of C<readline ${"a"}>.
-L<[perl #116677]|https://rt.perl.org/Ticket/Display.html?id=116677>
+XXX Remove this section if inapplicable.
 
-=item *
+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
+prerequisites.
 
-L<CPAN::Meta::YAML> has been upgraded from version 0.017-TRIAL to 0.018,
-with no change since 0.017.
+The core versions of these modules will now issue C<"deprecated">-category
+warnings to alert you to this fact.  To silence these deprecation warnings,
+install the modules in question from CPAN.
 
-=item *
+Note that these are (with rare exceptions) fine modules that you are encouraged
+to continue to use.  Their disinclusion from core primarily hinges on their
+necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
+not usually on concerns over their design.
 
-L<CPAN::Meta::Requirements> has been upgraded from version 2.133 to 2.140.
+=over
 
-Adds a method for getting structured requirements and adds better error
-messages.
+=item XXX
 
-=item *
+XXX Note that deprecated modules should be listed here even if they are listed
+as an updated module in the L</Modules and Pragmata> section.
 
-L<Data::Dumper> has been upgraded from version 2.158 to 2.159.
+=back
 
-This adds a "Trailingcomma" option, which when enabled adds a trailing comma
-after the last element of dumped arrays and hashes that would otherwise be
-followed immediately by a line break.
-L<[perl #126813]|https://rt.perl.org/Ticket/Display.html?id=126813>
+[ List each other deprecation as a =head2 entry ]
 
-The internals have also been substantially refactored and cleaned up.  It
-may be more efficient on some platforms.
+=head1 Performance Enhancements
 
-=item *
+XXX Changes which enhance performance without changing behaviour go here.
+There may well be none in a stable release.
 
-L<DynaLoader> has been upgraded from version 1.36 to 1.37.
+[ List each enhancement as a =item entry ]
 
-Fixed an else nesting issue in dynamic loading support for OS/390 (and
-similar systems) that was introduced in 1.36.
+=over 4
 
 =item *
 
-L<File::Spec> and L<Cwd> have been upgraded from version 3.59 to 3.60,
-adding L<File::Spec::AmigaOS>.
+XXX
 
-=item *
+=back
 
-L<Hash::Util::FieldHash> has been upgraded from version 1.18 to 1.19.
+=head1 Modules and Pragmata
 
-=item *
+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.
 
-L<Locale::Codes> has been upgraded from version 3.36 to 3.37.
+[ Within each section, list entries as a =item entry ]
 
-=item *
+=head2 New Modules and Pragmata
 
-L<Math::BigInt::FastCalc> has been updated from version 0.37 to 0.38.
+=over 4
 
 =item *
 
-L<Module::Metadata> has been updated from version 1.000030-TRIAL to
-1.000031-TRIAL, with no functional changes.
-
-=item *
+XXX
 
-L<Term::ANSIColor> has been upgraded from version 4.03 to 4.04, with no
-functional changes.
+=back
 
-=item *
+=head2 Updated Modules and Pragmata
 
-L<Unicode::Normalize> has been updated from version 1.23 to 1.24, with
-no functional changes.
+=over 4
 
 =item *
 
-L<strict> has been upgraded from version 1.09 to 1.10, with only a
-documentation change.
+L<Module::CoreList> has been upgraded from version 5.20151220 to 5.20160120.
 
 =item *
 
-L<threads> has been upgraded from version 2.04 to 2.05.
+The F<cpan/podlators/> bundle has been upgraded from version 2.28 to 4.04.
 
-=item *
+=back
 
-L<utf8> has been upgraded from version 1.17 to 1.18.
+=head2 Removed Modules and Pragmata
 
-Partly reverted a micro-optimization to F<lib/utf_heavy.pl> that
-caused self-recursion when it was loaded with C<${^ENCODING}> set.
-L<[perl #126593]|https://rt.perl.org/Ticket/Display.html?id=126593>
+=over 4
 
 =item *
 
-The modules L<sigtrap>, L<DB>, and the perl debugger could have, under
-rare circumstances, output raw control characters.  This has been fixed.
+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
 
-=head3 L<perlfunc>
+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 *
 
-The documentation of C<hex> has been revised to clarify valid inputs.
+XXX Description of the change here
 
 =back
 
-=head3 L<perlop>
+=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
 
 =item *
 
-The documentation of C<qx//> now describes how C<$?> is affected.
+XXX L<message|perldiag/"message">
 
 =back
 
-=head3 L<perlvar>
+=head3 New Warnings
 
 =over 4
 
 =item *
 
-The documentation of C<$@> was reworded to clarify that it is not just for
-syntax errors in C<eval>.
-L<[perl #124034]|https://rt.perl.org/Ticket/Display.html?id=124034>
+XXX L<message|perldiag/"message">
 
 =back
 
-=head3 L<perlxs>
+=head2 Changes to Existing Diagnostics
+
+XXX Changes (i.e. rewording) of diagnostic messages go here
 
 =over 4
 
 =item *
 
-The documentation of C<PROTOTYPES> has been clarified; they are I<disabled>
-by default, not I<enabled>.
+Accessing the C<IO> part of a glob as C<FILEHANDLE> instead of C<IO> is no
+longer deprecated.  It is discouraged to encourage uniformity (so that, for
+example, one can grep more easily) but it will not be removed. [perl #127060]
 
 =back
 
-=head1 Diagnostics
+=head1 Utility Changes
 
-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 Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
+Most of these are built within the directory F<utils>.
 
-=head2 New Diagnostics
+[ List utility changes as a =head2 entry for each utility and =item
+entries for each change
+Use L<XXX> with program names to get proper documentation linking. ]
 
-=head3 New Errors
+=head2 L<XXX>
 
 =over 4
 
 =item *
 
-L<Invalid number '%s' for -C option.|perldiag/"Invalid number '%s' for -C option.">
-
-(F) You supplied a number to the -C option that either has extra leading
-zeroes or overflows perl's unsigned integer representation.
+XXX
 
 =back
 
 =head1 Configuration and Compilation
 
+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
 
 =item *
 
-F<make_ext.pl> is no longer inappropriately silent.  This was caused
-by an operator precedence error introduced in 5.23.4.
+F<Configure> no longer probes for F<libnm> by default.  Originally
+this was the "New Math" library, but the name has been re-used by the
+GNOME NetworkManager.  [perl #127131]
 
 =back
 
-=head1 Platform Support
+=head1 Testing
 
-=head2 New Platforms
+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 OpenIndiana
+=item *
 
-OpenIndiana (continuation of OpenSolaris) builds were not working due
-to problems with the Perl shared library.  This should be working now.
-L<[perl #126958]|https://rt.perl.org/Ticket/Display.html?id=126958>
+XXX
 
 =back
 
-=head2 Platform-Specific Notes
+=head1 Platform Support
 
-=over 4
+XXX Any changes to platform support should be listed in the sections below.
 
-=item EBCDIC platforms, such as z/OS
+[ Within the sections, list each platform as a =item entry with specific
+changes as paragraphs below it. ]
 
-UTF-EBCDIC is like UTF-8, but for EBCDIC platforms.  It now has been
-extended so that it can represent code points up to 2 ** 64 - 1 on
-platforms with 64-bit words.  This brings it into parity with UTF-8.
-This enhancement requires an incompatible change to the representation
-of code points in the range 2 ** 30 to 2 ** 31 -1 (the latter was the
-previous maximum representable code point).  This means that a file that
-contains one of these code points, written out with previous versions of
-perl cannot be read in, without conversion, by a perl containing this
-change.  We do not believe any such files are in existence, but if you
-do have one, submit a ticket at L<perlbug@perl.org|mailto:perlbug@perl.org>,
-and we will write a conversion script for you.
+=head2 New Platforms
 
-=item Cygwin
+XXX List any platforms that this version of perl compiles on, that previous
+versions did not.  These will either be enabled by new files in the F<hints/>
+directories, or new subdirectories and F<README> files at the top level of the
+source tree.
 
-Tests are more robust against unusual cygdrive prefixes.
-L<[perl #126834]|https://rt.perl.org/Ticket/Display.html?id=126834>
+=over 4
 
-=item OS X/Darwin
+=item XXX-some-platform
 
-Builds with both -DDEBUGGING and threading enabled would fail with a
-"panic: free from wrong pool" error when built or tested from Terminal
-on OS X.  This was caused by perl's internal management of the
-environment conflicting with an atfork handler using the libc
-setenv() function to update the environment.
+XXX
 
-Perl now uses setenv()/unsetenv() to update the environment on OS X.
-L<[perl #126240]|https://rt.perl.org/Ticket/Display.html?id=126240>
+=back
 
-=item ppc64el floating point
+=head2 Discontinued Platforms
 
-The floating point format of ppc64el (Debian naming for little-endian
-PowerPC) is now detected correctly.
+XXX List any platforms that this version of perl no longer compiles on.
 
-=item Solaris
+=over 4
 
-All Solaris now builds shared libperl.
+=item XXX-some-platform
 
-Solaris and variants like OpenIndiana now always build with the shared
-Perl library (Configure -Duseshrplib).  This was required for the
-OpenIndiana builds, but this has also been the setting for Oracle/Sun
-Perl builds for several years.
+XXX
 
 =back
 
-=head1 Internal Changes
+=head2 Platform-Specific Notes
 
-=over 4
+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
 
-Perl core code and the threads extension have been annotated so that,
-if Perl is configured to use threads, then during compile-time clang (3.6
-or later) will warn about suspicious uses of mutexes.
-See L<http://clang.llvm.org/docs/ThreadSafetyAnalysis.html> for more
-information.
+=item XXX-some-platform
 
-=item *
+XXX
 
-The C<signbit()> emulation has been enhanced.  This will help older
-and/or more exotic platforms or configurations.
+=back
 
-=item *
+=head1 Internal Changes
 
-The C<to_utf8_case> function is discouraged in favor of C<toUPPER_utf8>,
-C<toTITLE_utf8>, C<toLOWER_utf8>, and C<toFOLD_utf8>.
+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.
 
-=item *
+[ List each change as a =item entry ]
 
-EBCDIC code paths have largely been unified to avoid repetition.
+=over 4
 
 =item *
 
-MSWin32 code for C<$^X> has been moved out of the F<win32> directory to
-F<caretx.c>, where other operating systems set that variable.
+XXX
 
 =back
 
 =head1 Selected Bug Fixes
 
-=over 4
+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</...\G/> no longer crashes on utf8 strings. When C<\G> is a fixed number
-of characters from the start of the regex, perl needs to count back that
-many characters from the current C<pos()> position and start matching from
-there. However, it was counting back bytes rather than characters, which
-could lead to panics on utf8 strings.
+=over 4
 
 =item *
 
-In some cases operators that return integers would return negative
-integers as large positive integers.
-L<[perl #126635]|https://rt.perl.org/Ticket/Display.html?id=126635>
+Calls to the placeholder C<&PL_sv_yes> used internally when an
+import() or unimport() method isn't found now correctly handle scalar
+context.  [perl #126042]
 
 =item *
 
-The C<pipe()> operator would assert for DEBUGGING builds instead of
-producing the correct error message.  The condition asserted on is
-detected and reported on correctly without the assertions, so the
-assertions were removed.
-L<[perl #126480]|https://rt.perl.org/Ticket/Display.html?id=126480>
+Fixed some problems introduced in 5.23.2 with list assignment dealing
+with magic and XS functions returning their arguments.  [perl #126633]
 
 =item *
 
-In some cases, failing to parse a here-doc would attempt to use freed
-memory.  This was caused by a pointer not being restored correctly.
-L<[perl #126443]|https://rt.perl.org/Ticket/Display.html?id=126443>
+Report more context when we see an array where we expect to see an
+operator.  [perl #123737]
 
 =item *
 
-C<< @x = sort { *a = 0; $a <=> $b } 0 .. 1 >> no longer frees the GP
-for *a before restoring its SV slot.
-L<[perl #124097]|https://rt.perl.org/Ticket/Display.html?id=124097>
+Modifying an array that was previously a package C<@ISA> no longer
+causes assertion failures or crashes.  [perl #123788]
 
-=item *
+=back
 
-Multiple problems with the new hexadecimal floating point printf
-format C<%a> were fixed:
-L<[perl #126582]|https://rt.perl.org/Ticket/Display.html?id=126582>,
-L<[perl #126586]|https://rt.perl.org/Ticket/Display.html?id=126586>,
-L<[perl #126822]|https://rt.perl.org/Ticket/Display.html?id=126822>
+=head1 Known Problems
 
-=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.
 
-Calling mg_set() in leave_scope() no longer leaks.
+[ List each fix as a =item entry ]
+
+=over 4
 
 =item *
 
-A regression from Perl v5.20 was fixed in which debugging output of regular
-expression compilation was wrong.  (The pattern was correctly compiled, but
-what got displayed for it was wrong.)
+XXX
 
 =back
 
-=head1 Acknowledgements
+=head1 Errata From Previous Releases
 
-Perl 5.23.6 represents approximately 4 weeks of development since Perl 5.23.5
-and contains approximately 11,000 lines of changes across 260 files from 22
-authors.
+=over 4
+
+=item *
 
-Excluding auto-generated files, documentation and release tools, there were
-approximately 7,500 lines of changes to 170 .pm, .t, .c and .h files.
+XXX Add anything here that we forgot to add, or were mistaken about, in
+the perldelta of a previous release.
 
-Perl continues to flourish into its third decade thanks to a vibrant community
-of users and developers. The following people are known to have contributed the
-improvements that became Perl 5.23.6:
+=back
+
+=head1 Obituary
 
-Aaron Crane, Abigail, Achim Gratz, Andy Broad, Aristotle Pagaltzis, Chris
-'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari MannsÃ¥ker, Daniel Dragan,
-David Golden, David Mitchell, Doug Bell, Ed Avis, Jarkko Hietaniemi, Karen
-Etheridge, Karl Williamson, Lukas Mai, Ricardo Signes, Shlomi Fish, Steve Hay,
-Sullivan Beck, Tony Cook.
+XXX If any significant core contributor has died, we've added a short obituary
+here.
 
-The list above is almost certainly incomplete as it is automatically generated
-from version control history. In particular, it does not include the names of
-the (very much appreciated) contributors who reported issues to the Perl bug
-tracker.
+=head1 Acknowledgements
 
-Many of the changes included in this version originated in the CPAN modules
-included in Perl's core. We're grateful to the entire CPAN community for
-helping Perl to flourish.
+XXX Generate this with:
 
-For a more complete list of all of Perl's historical contributors, please see
-the F<AUTHORS> file in the Perl source distribution.
+  perl Porting/acknowledgements.pl v5.23.6..HEAD
 
 =head1 Reporting Bugs