This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: c56ed9f deserves no mention
[perl5.git] / pod / perldelta.pod
index 75a6ed3..29d346a 100644 (file)
@@ -2,12 +2,11 @@
 
 =for comment
 Stuff that needs to be done still:
-e82485c [MERGE] refactor pp_match(), pp_subst(), regexec()
-6136213 [perl #52000] Warn/abort on attempted perl exit
-cccbbce Reap child in case where exception has been thrown
 70502ce [perl #119101] Extraneous warnings in Parse::ErrorString::Perl
-c3923c3 reparse compile-time /(?{})/ in right scope
-aa8c2dc Fix RT #41461 (with a test).
+88b3a46 PATCH (partial) [perl #107816] Performance regression since 0abd0d78
+eb40d2c [perl #2726] Prototype is not applied until BLOCK is defined
+8fe3c67 fix 114884 positive GPOS lookbehind regex substitution failure
+d8fe30a Avoid read-after-free in S_scan_heredoc() if the terminator line has no "\n".
 
 =head1 NAME
 
@@ -38,9 +37,9 @@ here, but most should go in the L</Performance Enhancements> section.
 
 =head2 B<-F> now implies B<-a> and B<-a> implies B<-n>
 
-Previously B<-F> without B<-a> was a no-op, and B<-a> without B<-n> or
-B<-p> was a no-op, with this change, if you supply B<-F> then both
-B<-a> and B<-n> are implied and if you supply B<-a> then B<-n> is implied.
+Previously B<-F> without B<-a> was a no-op, and B<-a> without B<-n> or B<-p>
+was a no-op, with this change, if you supply B<-F> then both B<-a> and B<-n>
+are implied and if you supply B<-a> then B<-n> is implied.
 
 You can still use B<-p> for its extra behaviour. [perl #116190]
 
@@ -138,9 +137,9 @@ XXX
 
 L<B> has been upgraded from version 1.44 to 1.45.
 
-Calling the C<GV> method on C<B::CV> objects created from a lexical
-sub would return nonsense, possibly crashing perl. C<GV> now returns
-C<undef> for lexical subs. [perl #118525]
+Calling the C<GV> method on C<B::CV> objects created from a lexical sub would
+return nonsense, possibly crashing perl.  C<GV> now returns C<undef> for
+lexical subs. [perl #118525]
 
 Added the C<NAME_HEK> method to return the name of a lexical sub.
 
@@ -148,58 +147,144 @@ Added the C<NAME_HEK> method to return the name of a lexical sub.
 
 L<bignum> has been upgraded from version 0.35 to 0.36.
 
-L<bigrat> wasn't correctly updating an internal variable when C<use>d
-with a C<lib> option.
+L<bigrat> wasn't correctly updating an internal variable when C<use>d with a
+C<lib> option.
 
 =item *
 
 L<Carp> has been upgraded from 1.30 to 1.31
 
-L<Carp> now handles objects with string overloads. It also allows objects
-to specify how they appear in the stack dump with a C<CARP_TRACE> method,
-and also allows the user to specify their own formatter for objects without
+L<Carp> now handles objects with string overloads.  It also allows objects to
+specify how they appear in the stack dump with a C<CARP_TRACE> method, and also
+allows the user to specify their own formatter for objects without
 C<CARP_TRACE> as well as other references. [perl #92446]
 
 =item *
 
 L<Compress::Raw::Bzip2> has been upgraded from 2.061 to 2.062.
 
+XXX: TODO
+
 =item *
 
 L<Compress::Raw::Zlib> has been upgraded from 2.061 to 2.062.
 
+XXX: TODO
+
 =item *
 
 L<Config::Perl::V> has been upgraded from version 0.18 to 0.19.
 
+XXX: TODO
+
+=item *
+
+L<constant> has been upgraded from version 1.27 to 1.28.
+
+Note that list constants will be inlined and may be read-only in future Perl
+versions.
+
+=item *
+
+L<CPAN::Meta> has been upgraded from version 2.131560 to 2.132140.
+
+Some documentation typos have been fixed.
+
 =item *
 
 L<Data::Dumper> has been upgraded from version 2.147 to 2.148.
 
-The compatbility of the XS implementation with the pure perl version
-under C<Useqq> has been improved. [perl #118933]
+The compatbility of the XS implementation with the pure perl version under
+C<Useqq> has been improved. [perl #118933]
+
+=item *
+
+L<DB> has been upgraded from 1.41 to 1.42.
+
+The Perl debugger no longer crashes with C<PERLDB_OPTS="noTTY frame=2">.
 
 =item *
 
 L<Devel::Peek> has been upgraded from version 1.12 to 1.13.
 
-The C<SvREFCNT_inc()> and C<SvREFCNT_dec()> functions have been
-removed and C<SvREFCNT()> will now work on non-scalars. [perl #117793]
+C<SvREFCNT_inc> and C<SvREFCNT_dec> have been removed and C<SvREFCNT> will now
+work on non-scalars. [perl #117793]
+
+C<Dump> now checks its arguments at compile time.  Both arguments are now
+evaluated in scalar context, with exceptions for @arrays and %hashes, allowing
+aggregates to be dumped directly.  The first argument is evaluated in rvalue
+scalar context, allowing rvalue C<pos> and C<substr> to be dumped.
 
 C<fill_mstats> no longer crashes if its argument is not already a string.
 [perl #92260]
 
 =item *
 
+L<diagnostics> has been upgraded from version 1.31 to 1.32.
+
+Wrapped links are no longer truncated.
+
+=item *
+
+L<DynaLoader> has been upgraded from version 1.18 to 1.19.
+
+The $dl_dlext variable is now documented.
+
+=item *
+
+L<Encode> has been upgraded from version 2.51 to 2.52.
+
+Encoding "0" with MIME-Headers no longer gets a blank string.
+
+=item *
+
+L<English> has been upgraded from version 1.07 to 1.08.
+
+The documentation of a performance fix has been corrected.
+
+=item *
+
 L<Exporter> has been upgraded from version 5.68 to 5.69.
 
-L<Exporter> would ignore custom C<$SIG{__WARN__}> handlers in
-C<Exporter::Heavy>. [perl #39739]
+L<Exporter> would ignore custom $SIG{__WARN__} handlers in C<Exporter::Heavy>.
+[perl #39739]
+
+=item *
+
+L<File::Spec> has been upgraded from 3.41 to 3.44.
+
+The module is now partly implemented in XS, for performance.
+
+=item *
+
+L<ExtUtils::MakeMaker> has been upgraded from 6.68 to 6.72.
+
+The C<dist> target now reports the file created, an infinite loop in
+C<clean_subdirs> has been fixed, an invisible interactive question is now
+avoided when rebuilding Makefile, issues with F</cygdrive> on Cygwin have been
+resolved, C<LD> and C<OPTIMIZE> are now used in recursive F<Makefile.PL>
+invocations, C<VERSION> and C<VERSION_FROM> now handle v-strings correctly, and
+control characters are now stripped from C<ABSTRACT>.
+
+=item *
+
+L<ExtUtils::ParseXS> has been upgraded from version 3.18 to 3.21.
+
+XXX: TODO
+
+=item *
+
+L<Getopt::Std> has been upgraded from version 1.09 to 1.10.
+
+Clarified documentation of what happens when a switch is expecting an argument
+but fails to be provided with one.
 
 =item *
 
 The IO-Compress module collection has been upgraded from 2.061 to 2.062.
 
+XXX: TODO
+
 =item *
 
 L<IPC::Cmd> has been upgraded from version 0.82 to 0.84.
@@ -209,11 +294,26 @@ needed and a regression introduced in 0.78 has been fixed.
 
 =item *
 
+L<IPC::Open3> has been upgradded from version 1.14 to 1.15.
+
+C<open3> would leak a zombie process if the child process I/O redirection or
+C<exec> failed. [perl #114722]
+
+=item *
+
+L<IPC::SysV> has been upgraded from version 2.03 to 2.04.
+
+$EXPORT_TAGS{all} has been added and a couple of typos have been fixed.
+
+=item *
+
 The libnet module collection has been upgraded from version 1.22 to 1.23.
 
+XXX: TODO
+
 =item *
 
-L<List::Util> has been upgraded from version 1.27 to 1.30
+L<List::Util> has been upgraded from version 1.27 to 1.31.
 
 L<List::Util> now includes C<pairgrep>, C<pairmap>, C<pairs>, C<pairkeys>,
 C<pairvalues> and C<pairfirst> functions that operate on even-sized lists of
@@ -221,8 +321,42 @@ pairs.
 
 =item *
 
+L<Module::Build> has been upgraded from 0.4005 to 0.4007.
+
+The test suite has been significantly sped up, Unicode man page support has
+been enhanced and hash argument parsing in subclasses has been fixed.
+
+=item *
+
+L<Module::CoreList> has been upgraded from 2.92 to 2.97.
+
+XXX: TODO
+
+=item *
+
+L<mro> has been upgraded from version 1.12 to 1.13.
+
+A minor typo has been fixed in the documentation.
+
+=item *
+
 L<parent> has been upgraded from version 0.225 to 0.226.
 
+XXX: TODO
+
+=item *
+
+L<PerlIO> has been upgraded from version 1.07 to 1.08.
+
+Although not a security vulnerability, it was possible to inject code via
+C<PerlIO-E<gt>import()>.  This has now been fixed. [perl #119287]
+
+=item *
+
+L<Pod::Functions> has been upgraded from version 1.07 to 1.08.
+
+Internal changes only have been made to the test suite.
+
 =item *
 
 L<Socket> has been upgraded from version 2.010 to 2.011.
@@ -234,13 +368,28 @@ structures due to embedded sun_len. [cpan #86613]
 
 L<Storable> has been upgraded from version 2.45 to 2.46.
 
-Avoid creating temporary objects for STORABLE_attach when they aren't
-required. [perl #118907]
+Avoid creating temporary objects for STORABLE_attach when they aren't required.
+[perl #118907]
+
+=item *
+
+L<Time::HiRes> has been upgraded from version 1.9725 to 1.9726.
+
+Now provides an C<lstat> function.
+Various bugs fixed.
 
 =item *
 
 L<Time::Piece> has been upgraded from version 1.21 to 1.22.
 
+XXX: TODO
+
+=item *
+
+L<utf8> has been upgraded from version 1.12 to 1.13.
+
+A minor clarification has been made in the documentation.
+
 =back
 
 =head2 Removed Modules and Pragmata
@@ -282,12 +431,33 @@ The C<open> tutorial has been completely rewriten by Tom Christiansen, and now
 focuses on covering only the basics, rather than providing a comprehensive
 reference to all things openable.  This rewrite came as the result of a
 vigorous discussion on perl5-porters kicked off by a set of improvements
-written by Alexander Hartmaier to the existing C<perlopentut>.  A "more than
+written by Alexander Hartmaier to the existing L<perlopentut>.  A "more than
 you ever wanted to know about C<open>" document may follow in subsequent
 versions of perl.
 
 =back
 
+=head3 L<perlre>
+
+=over 4
+
+=item *
+
+The C</r> modifier (for non-destructive substitution) is now documented. [perl
+#119151]
+
+=back
+
+=head3 L<perlxs>
+
+=over 4
+
+=item *
+
+Several problems in the C<MY_CXT> example have been fixed.
+
+=back
+
 =head1 Diagnostics
 
 The following additions or changes have been made to diagnostic output,
@@ -318,13 +488,12 @@ XXX L<message|perldiag/"message">
 
 =item *
 
-L<Argument "%s" treated as 0 in increment (++)|perldiag/"Argument
-"%s" treated as 0 in increment (++)">
+L<Argument "%s" treated as 0 in increment (++)|perldiag/"Argument "%s" treated
+as 0 in increment (++)">
 
-(W numeric) The indicated string was fed as an argument to the C<++>
-operator which expects either a number or a string matching
-C</^[a-zA-Z]*[0-9]*\z/>.  See L<perlop/Auto-increment and
-Auto-decrement> for details.
+(W numeric) The indicated string was fed as an argument to the C<++> operator
+which expects either a number or a string matching C</^[a-zA-Z]*[0-9]*\z/>.
+See L<perlop/Auto-increment and Auto-decrement> for details.
 
 =back
 
@@ -455,8 +624,13 @@ well.
 
 =item *
 
-C<sv_pos_b2u_flags> has been added to the API.  It is similar to
-C<sv_pos_b2u>, but supports long strings on 64-bit platforms.
+C<sv_pos_b2u_flags> has been added to the API.  It is similar to C<sv_pos_b2u>,
+but supports long strings on 64-bit platforms.
+
+=item *
+
+C<PL_exit_flags> can now be used by perl embedders or other XS code to have
+perl C<warn> or C<abort> on an attempted exit. [perl #52000]
 
 =back
 
@@ -471,60 +645,58 @@ files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
 
 =item *
 
-Autovivifying a subroutine stub via C<\&$glob> started causing crashes in
-Perl 5.18.0 if the $glob was merely a copy of a real glob, i.e., a scalar
-that had had a glob assigned to it.  This has been fixed [perl #119051].
+Autovivifying a subroutine stub via C<\&$glob> started causing crashes in Perl
+5.18.0 if the $glob was merely a copy of a real glob, i.e., a scalar that had
+had a glob assigned to it.  This has been fixed. [perl #119051]
 
 =item *
 
-On 64-bit platforms C<pos> can now be set to a value higher than 2**31-1
-[perl #72766].
+On 64-bit platforms C<pos> can now be set to a value higher than 2**31-1.
+[perl #72766]
 
 =item *
 
 Perl used to leak an implementation detail when it came to referencing the
-return values of certain operators.  C<for ($a+$b) { warn \$_; warn \$_ }>
-used to display two different memory addresses, because the C<\> operator
-was copying the variable.  Under threaded builds, it would also happen for
-constants (C<for(1) { ... }>).  This has been fixed [perl #21979, #78194,
-#89188, #109746, #114838, #115388].
+return values of certain operators.  C<for ($a+$b) { warn \$_; warn \$_ }> used
+to display two different memory addresses, because the C<\> operator was
+copying the variable.  Under threaded builds, it would also happen for
+constants (C<for(1) { ... }>).  This has been fixed. [perl #21979, #78194,
+#89188, #109746, #114838, #115388]
 
 =item *
 
-The range operator C<..> was returning the same modifiable scalars with
-each call, unless it was the only thing in a C<foreach> loop header.  This
-meant that changes to values within the list returned would be visible the
-next time the operator was executed [perl #3105].
+The range operator C<..> was returning the same modifiable scalars with each
+call, unless it was the only thing in a C<foreach> loop header.  This meant
+that changes to values within the list returned would be visible the next time
+the operator was executed. [perl #3105]
 
 =item *
 
-Constant folding and subroutine inlining no longer cause operations that
-would normally return new modifiable scalars to return read-only values
-instead.
+Constant folding and subroutine inlining no longer cause operations that would
+normally return new modifiable scalars to return read-only values instead.
 
 =item *
 
 Closures of the form C<sub () { $some_variable }> are no longer inlined,
-causing changes to the variable to be ignored by callers of the subroutine
-[perl #79908].
+causing changes to the variable to be ignored by callers of the subroutine.
+[perl #79908]
 
 =item *
 
 Return values of certain operators such as C<ref> would sometimes be shared
 between recursive calls to the same subroutine, causing the inner call to
-modify the value returned by C<ref> in the outer call.  This has been
-fixed.
+modify the value returned by C<ref> in the outer call.  This has been fixed.
 
 =item *
 
 C<__PACKAGE__> and constants returning a package name or hash key are now
-consistently read-only.  In various previous Perl releases, they have
-become mutable under certain circumstances.
+consistently read-only.  In various previous Perl releases, they have become
+mutable under certain circumstances.
 
 =item *
 
-C</$qr/p> was broken in Perl 5.18.0; the C</p> flag was ignored.  This has
-been fixed [perl #118213].
+C</$qr/p> was broken in Perl 5.18.0; the C</p> flag was ignored.  This has been
+fixed. [perl #118213]
 
 =item *
 
@@ -534,22 +706,21 @@ unparsed.  This has been corrected.
 
 =item *
 
-Starting in Perl 5.001, a regular expression like C</[#$a]/x> or
-C</[#]$a/x> would have its C<#> incorrectly interpreted as a comment, so
-the variable would not interpolate.  This has been corrected [perl #45667].
+Starting in Perl 5.001, a regular expression like C</[#$a]/x> or C</[#]$a/x>
+would have its C<#> incorrectly interpreted as a comment, so the variable would
+not interpolate.  This has been corrected. [perl #45667]
 
 =item *
 
-On non-threaded builds, setting C<${"_<filename"}> to a reference or
-typeglob no longer causes C<__FILE__> and some error messages to produce a
-corrupt string, and no longer prevents C<#line> directives in string evals
-from providing the source lines to the debugger.  Threaded builds were
-unaffected.
+On non-threaded builds, setting C<${"_<filename"}> to a reference or typeglob
+no longer causes C<__FILE__> and some error messages to produce a corrupt
+string, and no longer prevents C<#line> directives in string evals from
+providing the source lines to the debugger.  Threaded builds were unaffected.
 
 =item *
 
-Enabling "used once" warnings no longer causes crashes on stash
-circularities created at compile time (C<*Foo::Bar::Foo:: = *Foo::>).
+Enabling "used once" warnings no longer causes crashes on stash circularities
+created at compile time (C<*Foo::Bar::Foo:: = *Foo::>).
 
 =item *
 
@@ -558,26 +729,27 @@ longer produce "uninitialized" warnings at compile time.
 
 =item *
 
-Modifying a substitution target inside the substitution replacement no
-longer causes crashes.
+Modifying a substitution target inside the substitution replacement no longer
+causes crashes.
 
 =item *
 
-The first statement inside a string eval used to use the wrong pragma setting sometimes during constant folding.  C<eval 'uc chr 0xe0'> would randomly choose between Unicode, byte, and locale semantics.  This has been
-fixed.
+The first statement inside a string eval used to use the wrong pragma setting
+sometimes during constant folding.  C<eval 'uc chr 0xe0'> would randomly choose
+between Unicode, byte, and locale semantics.  This has been fixed.
 
 =item *
 
 The handling of return values of @INC filters (subroutines returned by
-subroutines in @INC) has been fixed in various ways.  Previously tied
-variables were mishandled, and setting $_ to a reference or typeglob could
-result in crashes.
+subroutines in @INC) has been fixed in various ways.  Previously tied variables
+were mishandled, and setting $_ to a reference or typeglob could result in
+crashes.
 
 =item *
 
-The C<SvPVbyte> XS function has been fixed to work with tied scalars
-returning something other than a string.  It used to return utf8 in those
-cases where C<SvPV> would.
+The C<SvPVbyte> XS function has been fixed to work with tied scalars returning
+something other than a string.  It used to return utf8 in those cases where
+C<SvPV> would.
 
 =item *
 
@@ -586,8 +758,8 @@ S<(C<${ qr// }>)> false as booleans.  This has been fixed.
 
 =item *
 
-Perl 5.18.0 inadvertently made C<--> and C<++> crash on dereferenced
-regular expressions, and stopped C<++> from flattening vstrings.
+Perl 5.18.0 inadvertently made C<--> and C<++> crash on dereferenced regular
+expressions, and stopped C<++> from flattening vstrings.
 
 =item *
 
@@ -597,14 +769,31 @@ argument is a tied reference.
 =item *
 
 C<reset> with an argument no longer skips copy-on-write scalars, regular
-expressions, typeglob copies, and vstrings.  Also, when encountering those
-or read-only values, it no longer skips any array or hash with the same
-name.
+expressions, typeglob copies, and vstrings.  Also, when encountering those or
+read-only values, it no longer skips any array or hash with the same name.
+
+=item *
+
+C<reset> with an argument now skips scalars aliased to typeglobs
+(C<for $z (*foo) { reset "z" }>).  Previously it would corrupt memory or crash.
 
 =item *
 
 C<ucfirst> and C<lcfirst> were not respecting the bytes pragma.  This was a
-regression from v5.12 [perl #117355].
+regression from v5.12. [perl #117355]
+
+=item *
+
+The use of C<\G> in regular expressions, where it's not at the start of the
+pattern, is now slightly less buggy (although it is still somewhat
+problematic).
+
+=item *
+
+Where a regular expression included code blocks (C</(?{...})/>), and where the
+use of constant overloading triggered a re-compilation of the code block, the
+second compilation didn't see its outer lexical scope.  This was a regression
+in 5.18.0.
 
 =back