This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deprecate wide chars in logical string ops
[perl5.git] / pod / perldelta.pod
index 7c0a835..141a054 100644 (file)
 
 =head1 NAME
 
-perldelta - what is new for perl v5.23.0
+[ 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.6
 
 =head1 DESCRIPTION
 
-This document describes differences between the 5.22.0 release and the 5.23.0
+This document describes differences between the 5.23.5 release and the 5.23.6
 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.
+
+=head1 Notice
+
+XXX Any important notices here
+
 =head1 Core Enhancements
 
-=head2 Unicode 8.0 is now supported
+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 ]
 
-For details on what is in this release, see
-L<http://www.unicode.org/versions/Unicode8.0.0/>.
+=head1 Security
 
-=head2 Postfix dereferencing is no longer experimental
+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.
 
-Using the C<postderef> and C<postderef_qq> features no longer emits a warning.
-Existing code that disables that warning category will continue to work. The
-C<5.24> feature bundle now includes those features.
+[ List each security issue as a =head2 entry ]
 
 =head1 Incompatible Changes
 
-=head2 The C</\C/> character class has been removed.
+=head2 Some regular expression patterns that had runtime errors now
+don't compile at all
 
-This regular expression character class was deprecated in v5.20.0 and has
-produced a deprecation warning since v5.22.0. It is now a compile-time
-error. If you need to examine the individual bytes that make up a
-UTF8-encoded character, then use C<utf8::encode()> on the string (or a
-copy) first.
+This should have been in the perldelta for 5.23.4, but was omitted.
 
-=head2 C<chdir('')> no longer chdirs home
+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.
 
-Using C<chdir('')> or C<chdir(undef)> to chdir home has been deprecated since
-perl v5.8, and will now fail.  Use C<chdir()> instead.
+=head1 Deprecations
 
-=head1 Modules and Pragmata
+XXX Any deprecated features, syntax, modules etc. should be listed here.
 
-=head2 Updated Modules and Pragmata
+=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
+prerequisites.
+
+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.
+
+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.
+
+=over
+
+=item XXX
+
+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.
+
+=back
+
+[ List each other deprecation as a =head2 entry ]
+
+=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.
+
+=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 *
 
-The libnet distribution has been upgraded from version 3.05 to 3.06.
+XXX
 
-=item *
+=back
 
-The Scalar-List-Utils distribution has been upgraded from version 1.41 to 1.42.
+=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<autodie> has been upgraded from version 2.26 to 2.27.
+[ Within each section, list entries as a =item entry ]
 
-=item *
+=head2 New Modules and Pragmata
 
-L<CPAN::Meta> has been upgraded from version 2.150001 to 2.150005.
+=over 4
 
 =item *
 
-L<CPAN::Meta::Requirements> has been upgraded from version 2.132 to 2.133.
+XXX
 
-=item *
+=back
 
-L<CPAN::Meta::YAML> has been upgraded from version 0.012 to 0.016.
+=head2 Updated Modules and Pragmata
+
+=over 4
 
 =item *
 
-L<Encode> has been upgraded from version 2.72 to 2.75.
+L<Data::Dumper> has been upgraded from version 2.158 to 2.159.
+
+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.  [perl #126813]
 
 =item *
 
-L<encoding> has been upgraded from version 2.14 to 2.15.
+L<DynaLoader> has been upgraded from version 1.36 to 1.37.
+
+Fixed an else nesting issue in dynamic loading support for OS/390 (and
+similar systems) that was introduced in 1.36.
 
 =item *
 
-L<ExtUtils::CBuilder> has been upgraded from version 0.280221 to 0.280223.
+L<utf8> has been upgraded from 1.17 to 1.18.
+
+Partly reverted a micro-optimization to F<lib/utf_heavy.pl> that
+caused self-recursion when it was loaded with C<${^ENCODING}> set.
+[perl #126593]
 
 =item *
 
-L<feature> has been upgraded from version 1.40 to 1.41.
+The modules L<sigtrap>, L<DB>, and the perl debugger could have under
+rare circumstances, without you expecting it, output containing raw
+control characters.  This has been fixed.
 
-=item *
+=back
 
-L<Getopt::Long> has been upgraded from version 2.45 to 2.46.
+=head2 Removed Modules and Pragmata
+
+=over 4
 
 =item *
 
-L<HTTP::Tiny> has been upgraded from version 0.054 to 0.056.
+XXX
 
-=item *
+=back
 
-L<List::Util> has been upgraded from version 1.41 to 1.42_01.
+=head1 Documentation
 
-=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<Locale::Codes> has been upgraded from version 3.34 to 3.35.
+=head2 New Documentation
 
-=item *
+XXX Changes which create B<new> files in F<pod/> go here.
 
-L<Math::BigInt> has been upgraded from version 1.9997 to 1.999701.
+=head3 L<XXX>
 
-Correct the behaviour of bdiv() and bmod() in list context. [perl #124300]
+XXX Description of the purpose of the new file here
 
-Correct C<< Math::BigInt->new() >> for non-integer input.  [perl #124325]
+=head2 Changes to Existing Documentation
 
-Speed up Math::BigFloat -> blog(). [perl #124382]
+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.
 
-Fix bug in Math::BigFloat's bceil() and bint() methods. [perl #124412]
+=head3 L<XXX>
+
+=over 4
 
 =item *
 
-L<Math::BigRat> has been upgraded from version 0.2608 to 0.260801.
+XXX Description of the change here
 
-Correct the behaviour of bdiv() and bmod() in list context. [perl #124303]
+=back
 
-=item *
+=head1 Diagnostics
 
-L<Module::CoreList> has been upgraded from version 5.20150520 to 5.20150620.
+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>.
 
-=item *
+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.
 
-L<Module::Metadata> has been upgraded from version 1.000026 to 1.000027.
+=head2 New Diagnostics
 
-=item *
+XXX Newly added diagnostic messages go under here, separated into New Errors
+and New Warnings
 
-L<parent> has been upgraded from version 0.232 to 0.234.
+=head3 New Errors
+
+=over 4
 
 =item *
 
-L<Parse::CPAN::Meta> has been upgraded from version 1.4414 to 1.4417.
+L<message|perldiag/"Invalid number '%s' for -C option.">
 
-=item *
+(F) You supplied a number to the -C option that either has extra leading
+zeroes or overflows perl's unsigned integer representation.
 
-L<perl5db.pl> has been upgraded from version 1.49 to 1.49_01.
 
-User actions are no longer evaluated after the script under the
-debugger finishes.  [perl #71678]
+=back
 
-=item *
+=head3 New Warnings
 
-L<Pod::Simple> has been upgraded from version 3.29 to 3.30.
+=over 4
 
 =item *
 
-L<Pod::Usage> has been upgraded from version 1.64 to 1.67.
+XXX L<message|perldiag/"message">
 
-=item *
+=back
 
-L<POSIX> has been upgraded from version 1.53 to 1.54.
+=head2 Changes to Existing Diagnostics
 
-The NaN payload API has been implemented (getpayload, setpayload,
-setpayloadsig, issignaling).
+XXX Changes (i.e. rewording) of diagnostic messages go here
+
+=over 4
 
 =item *
 
-L<Scalar::Util> has been upgraded from version 1.41 to 1.42_01.
+XXX Describe change here
 
-=item *
+=back
 
-L<Socket> has been upgraded from version 2.018 to 2.020.
+=head1 Utility Changes
 
-=item *
+XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
+Most of these are built within the directory F<utils>.
+
+[ 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. ]
 
-L<threads> has been upgraded from version 2.01 to 2.02.
+=head2 L<XXX>
+
+=over 4
 
 =item *
 
-L<Time::Piece> has been upgraded from version 1.29 to 1.30.
+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 *
 
-L<UNIVERSAL> has been upgraded from version 1.12 to 1.13.
+F<make_ext.pl> is no longer inappropriately silent.  This was caused
+by an operator precedence error introduced in 5.23.4.
+
+=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.
 
-Don't import from L<UNIVERSAL> in its documentation, it no longer
-exports anything.  [perl #125410]
+[ List each test improvement as a =item entry ]
+
+=over 4
+
+=item *
+
+XXX
 
 =back
 
 =head1 Platform Support
 
-=head2 Platform-Specific Notes
+XXX Any changes to platform support should be listed in the sections below.
+
+[ Within the sections, list each platform as a =item entry with specific
+changes as paragraphs below it. ]
+
+=head2 New Platforms
+
+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.
 
 =over 4
 
-=item Win32
+=item XXX-some-platform
 
-=over
+XXX
 
-=item *
+=back
 
-Visual C++ 2013 builds will now execute on XP and higher. Previously they would
-only execute on Vista and higher.
+=head2 Discontinued Platforms
 
-=item *
+XXX List any platforms that this version of perl no longer compiles on.
 
-You can now build perl with GNU Make and GCC.  [perl #123440]
+=over 4
 
-=item *
+=item XXX-some-platform
 
-C<truncate($filename, $size)> now works for files over 4GB in size.
-[perl #125347]
+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 EBCDIC platforms, such as z/OS
+
+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<mailto:perlbug@perl.org>, and we will
+write a conversion script for you.
+
 =back
 
-=head1 Selected Bug Fixes
+=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 *
 
-Duplicating a closed file handle for write no longer creates a
-filename of the form F<GLOB(0xXXXXXXXX)>.  [perl #125115]
+Perl core code and the threads extension have been annotated so that
+if Perl is configured to use threads, 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.
+
+=back
+
+=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 *
 
-Warning fatality is now ignored when rewinding the stack.  This
-prevents infinite recursion when the now fatal error also causes
-rewinding of the stack.  [perl #123398]
+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.
 
-=item * 
+=item *
 
-In perl v5.22.0, the logic changed when parsing a numeric parameter to the -C
-option, such that the successfully parsed number was not saved as the option
-value if it parsed to the end of the argument.  [perl #125381]
+In some cases operators that return integers would return negative
+integers as large positive integers.  [perl #126635]
 
 =item *
 
-The PadlistNAMES macro is an lvalue again.
+The 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.  [perl #126480]
 
 =item *
 
-Zero -DPERL_TRACE_OPS memory for sub-threads.
+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.
+[perl #126443]
 
-perl_clone_using() was missing Zero init of PL_op_exec_cnt[].  This
-caused sub-threads in threaded -DPERL_TRACE_OPS builds to spew exceedingly
-large op-counts at destruct.  These counts would print %x as "ABABABAB",
-clearly a mem-poison value.
+=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 *
+
+XXX
 
 =back
 
-=head1 Acknowledgements
+=head1 Errata From Previous Releases
+
+=over 4
 
-Perl 5.23.0 represents approximately 3 weeks of development since Perl 5.22.0
-and contains approximately 86,000 lines of changes across 480 files from 29
-authors.
+=item *
+
+XXX Add anything here that we forgot to add, or were mistaken about, in
+the perldelta of a previous release.
 
-Excluding auto-generated files, documentation and release tools, there were
-approximately 55,000 lines of changes to 270 .pm, .t, .c and .h files.
+=back
 
-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.0:
+=head1 Obituary
 
-Chase Whitener, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari
-MannsÃ¥ker, Daniel Dragan, David Golden, David Mitchell, Hugo van der Sanden,
-Jan Dubois, Jarkko Hietaniemi, Jerry D. Hedden, Jim Cromie, Karen Etheridge,
-Karl Williamson, kmx, Lukas Mai, Martijn Lievaart, Matthew Horsfall, Niko Tyni,
-Peter John Acklam, Rafael Garcia-Suarez, Reini Urban, Ricardo Signes, Shlomi
-Fish, Steve Hay, Thomas Sibley, Tony Cook, Unicode Consortium, Zefram.
+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.5..HEAD
 
 =head1 Reporting Bugs
 
 If you find what you think is a bug, you might check the articles recently
 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
-https://rt.perl.org/ .  There may also be information at
-http://www.perl.org/ , the Perl Home Page.
+L<https://rt.perl.org/> .  There may also be information at
+L<http://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