This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for 2872f9187
[perl5.git] / pod / perldelta.pod
index bc5365c..40ad7b2 100644 (file)
@@ -54,6 +54,23 @@ XXX For a release on a stable branch, this section aspires to be:
 
 [ List each incompatible change as a =head2 entry ]
 
+=head2 Changes to the C<*> prototype
+
+The C<*> character in a subroutine's prototype used to allow barewords
+to take precedence over most, but not all subroutines.  It was never
+consistent and exhibited buggy behaviour.
+
+Now it has been changed, so subroutines always take precedence over
+barewords, which brings it into conformity with similarly prototyped
+built-in functions:
+
+    sub splat($) { ... }
+    sub foo { ... }
+    splat(foo); # now always splat(foo())
+    splat(bar); # still splat('bar') as before
+    close(foo); # close(foo())
+    close(bar); # close('bar')
+
 =head1 Deprecations
 
 XXX Any deprecated features, syntax, modules etc. should be listed here.
@@ -98,7 +115,18 @@ There may well be none in a stable release.
 
 =item *
 
-XXX
+Subroutines with an empty prototype and bodies containing just C<undef> are
+now eligible for inlining.  [perl #122728]
+
+=item *
+
+Subroutines in packages no longer need to carry typeglobs around with them.
+Declaring a subroutine will now put a simple sub reference in the stash if
+possible, saving memory.  The typeglobs still notionally exist, so
+accessing them will cause the subroutine reference to be upgraded to a
+typeglob.  This optimisation does not currently apply to XSUBs or exported
+subroutines, and method calls will undo it, since they cache things in
+typeglobs.  [perl #120441]
 
 =back
 
@@ -128,7 +156,16 @@ XXX
 
 =item *
 
-L<XXX> has been upgraded from version A.xx to B.yy.
+L<Archive::Tar> has been upgraded from version 2.00 to 2.02.
+
+Tests can now be run in parallel.
+
+=item *
+
+L<B> has been upgraded from version 1.50 to 1.51.
+
+It provides a new C<B::safename> function, based on the existing
+C<< B::GV->SAFENAME >>, that converts "\cOPEN" to "^OPEN".
 
 =item *
 
@@ -136,6 +173,13 @@ L<B::Concise> has been upgraded from version 0.992 to 0.993.
 
 =item *
 
+L<B::Deparse> has been upgraded from version 1.27 to 1.28.
+
+It now deparses C<our(I<LIST>)> and typed lexical (C<my Dog $spot>)
+correctly.
+
+=item *
+
 L<CPAN::Meta::Requirements> has been upgraded from version 2.126 to 2.128.
 
 =item *
@@ -430,7 +474,34 @@ well.
 
 =over 4
 
-XXX
+=item *
+
+C<save_re_context> no longer does anything and has been moved to
+F<mathoms.c>.
+
+=item *
+
+C<cv_name> is a new API function that can be passed a CV or GV.  It returns
+an SV containing the name of the subroutine for use in diagnostics.
+[perl #116735] [perl #120441]
+
+=item *
+
+C<cv_set_call_checker_flags> is a new API function that works like
+C<cv_set_call_checker>, except that it allows the caller to specify whether
+the call checker requires a full GV for reporting the subroutine's name, or
+whether it could be passed a CV instead.  Whatever value is passed will be
+acceptable to C<cv_name>.  C<cv_set_call_checker> guarantees there will be
+a GV, but it may have to create one on the fly, which is inefficient.
+[perl #116735]
+
+=item *
+
+C<CvGV> (which is not part of the API) is now a more complex macro, which
+may call a function and reify a GV.  For those cases where is has been used
+as a boolean, C<CvHASGV> has been added, which will return true for CVs
+that notionally have GVs, but without reifying the GV.  C<CvGV> also
+returns a GV now for lexical subs.  [perl #120441]
 
 =back
 
@@ -552,6 +623,39 @@ v5.20.1 as well as here) in which a UTF-8 encoded regular expression
 pattern that contains a single ASCII lowercase letter does not match its
 uppercase counterpart. [perl #122655]
 
+=item *
+
+Constant folding could incorrectly suppress warnings if lexical warnings
+(C<use warnings> or C<no warnings>) were not in effect and C<$^W> were
+false at compile time and true at run time.
+
+=item *
+
+Loading UTF8 tables during a regular expression match could cause assertion
+failures under debugging builds if the previous match used the very same
+regular expression.  [perl #122747]
+
+=item *
+
+Thread cloning used to work incorrectly for lexical subs, possibly causing
+crashes or double frees on exit.
+
+=item *
+
+Since perl 5.14.0, deleting C<$SomePackage::{__ANON__}> and then undefining
+an anonymous subroutine could corrupt things internally, resulting in
+L<Devel::Peek> crashing or L<B.pm|B> giving nonsensical data.  This has
+been fixed.
+
+=item *
+
+C<(caller $n)[3]> now reports names of lexical subs, instead of treating
+them as "(unknown)".
+
+=item *
+
+C<sort subname LIST> now supports lexical subs for the comparison routine.
+
 =back
 
 =head1 Known Problems