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 06c7ac2..141a054 100644 (file)
 
 =head1 NAME
 
-perldelta - what is new for perl v5.23.5
+[ 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.23.4 release and the 5.23.5
+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.3, first read
-L<perl5234delta>, which describes differences between 5.23.3 and 5.23.4.
+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 Performance Enhancements
+=head1 Notice
 
-=over 4
+XXX Any important notices here
 
-=item *
+=head1 Core Enhancements
 
-Faster addition, subtraction and multiplication.
+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.
 
-Since 5.8.0, arithmetic became slower due to the need to support
-64-bit integers. To deal with 64-bit integers, a lot more corner
-cases need to be checked, which adds time. We now detect common
-cases where there is no need to check for those corner cases,
-and special-case them.
+[ List each enhancement as a =head2 entry ]
 
-=item *
+=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.
+
+[ List each security issue as a =head2 entry ]
+
+=head1 Incompatible Changes
+
+=head2 Some regular expression patterns that had runtime errors now
+don't compile at all
+
+This should have been in the perldelta for 5.23.4, but was omitted.
+
+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.
+
+=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
+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
 
-Faster preincrement, predecrement, postincrement, postdecrement.
+=item *
 
-By internally splitting the functions which handled multiple
-cases into different functions.
+XXX
 
 =back
 
@@ -61,7 +148,32 @@ XXX
 
 =item *
 
-L<XXX> has been upgraded from version A.xx to B.yy.
+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<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<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 *
+
+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.
 
 =back
 
@@ -75,152 +187,293 @@ 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
 
 =item *
 
-L<<< Sequence (?... not terminated in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"Sequence (?... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>" >>>
+L<message|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.
+
+
+=back
+
+=head3 New Warnings
+
+=over 4
+
+=item *
+
+XXX L<message|perldiag/"message">
 
 =back
 
 =head2 Changes to Existing Diagnostics
 
+XXX Changes (i.e. rewording) of diagnostic messages go here
+
 =over 4
 
 =item *
 
-When running out of memory during an attempt the increase the stack
-size, previously, perl would die using the cryptic message 
-C<< panic: av_extend_guts() negative count (-9223372036854775681) >>.
-This has been fixed to show the prettier message:
-L<< Out of memory during stack extend|perldiag/"Out of memory during %s extend" >>
+XXX Describe change here
 
 =back
 
-=head1 Configuration and Compilation
+=head1 Utility Changes
+
+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. ]
+
+=head2 L<XXX>
 
 =over 4
 
 =item *
 
-C<Configure> now acts as if the C<-O> option is always passed, allowing command
-line options to override saved configuration.  This should eliminate confusion
-when command line options are ignored for no obvious reason.  C<-O> is now
-permitted, but ignored.
+XXX
 
-=item *
+=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.
 
-Some filesystem stat symbols which were not used by the Perl core 
-were removed in an earlier commit. However, since these symbols
-turned out to be used by at least one CPAN module, these symbols
-have been restored.
+[ List changes as a =item entry ].
+
+=over 4
 
 =item *
 
-C<< PPPort.so/PPPort.dll >> no longer get installed, as they are
-not used by C<< PPPort.pm >>, only by its test files.
+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.
+
+[ List each test improvement as a =item entry ]
+
+=over 4
 
 =item *
 
-It is now possible to specify which compilation date to show on
-C<< perl -V >> output, by setting the macro C<< PERL_BUILD_DATE >>.
+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 XXX-some-platform
+
+XXX
+
+=back
+
+=head2 Discontinued Platforms
+
+XXX List any platforms that this version of perl no longer compiles on.
 
 =over 4
 
-=item Win32
+=item XXX-some-platform
 
-Win32 does now a parallel build with C++.
+XXX
 
-=item Tru64
+=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.
 
-Workaround where Tru64 balks when prototypes are listed as
-C<< PERL_STATIC_INLINE >>, but where the test is build with
-C<< -DPERL_NO_INLINE_FUNCTIONS >>.
+=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 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 *
 
-C<< sv_ref() >> is now part of the API.
+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 *
 
-C<\b{sb}> works much better.  In Perl v5.22.0, this new construct didn't
-seem to give the expected results, yet passed all the tests in the
-extensive suite furnished by Unicode.  It turns out that it was because
-these were short input strings, and the failures had to do with longer
-inputs.  This was fixed in Perl 5.23.4, but the improvement was not
-noticed until after that was released, so is included here now.
+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 *
 
-Certain syntax errors in
-L<perlrecharclass/Extended Bracketed Character Classes> caused panics
-instead of the proper error message.  This has now been fixed. [perl
-#126481]
+In some cases operators that return integers would return negative
+integers as large positive integers.  [perl #126635]
 
 =item *
 
-An earlier commit added a message when a quantifier in a regular
-expression was useless, but then caused the parser to skip it;
-this caused the surplus quantifier to be silently ignored, instead
-of throwing an error. This is now fixed [perl #126253]
+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 *
 
-The switch to building non-XS modules last in win32/makefile.mk (introduced
-by design as part of the changes to enable parallel building) caused the
-build of POSIX to break due to problems with the version module. This
-is now fixed.
+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]
 
-=item *
+=back
 
-Improved parsing of hex float constants.
+=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 *
 
-Fixed an issue with C<< pack >> where C<< pack "H" >> (and C<< pack "h" >>)
-could read past the source when given a non-utf8 source, and a utf8 target.
-[perl #126325]
+XXX
+
+=back
+
+=head1 Errata From Previous Releases
+
+=over 4
 
 =item *
 
-Fixed several cases where perl would abort due to a segmentation fault,
-or a C-level assert. [perl #126615], [perl #126602], [perl #126193].
+XXX Add anything here that we forgot to add, or were mistaken about, in
+the perldelta of a previous release.
 
 =back
 
+=head1 Obituary
+
+XXX If any significant core contributor has died, we've added a short obituary
+here.
+
 =head1 Acknowledgements
 
 XXX Generate this with:
 
-  perl Porting/acknowledgements.pl v5.23.4..HEAD
+  perl Porting/acknowledgements.pl v5.23.5..HEAD
 
 =head1 Reporting Bugs