This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for =>
[perl5.git] / pod / perldelta.pod
index a084e99..b6334ab 100644 (file)
@@ -142,6 +142,12 @@ happen to have local and incompatible files named F<EXTERN.h>, F<XSUB.h> or
 F<perl.h>, as these will now be picked up instead of the installed Perl
 headers.
 
+The C<canon()> function now correctly handles packages with multiple C<::>
+separators when the I<$as> parameter is not I</>. Given that it used to
+generate strings which would likely be syntax errors or pathnames instead of
+filenames, we infer that from the complete lack of bug reports no-one was
+using this functionality. (C<ExtUtils::Miniperl> is now using it.)
+
 =item *
 
 L<ExtUtils::Miniperl> has been upgraded and given a version of 1.
@@ -254,7 +260,11 @@ XXX L<message|perldiag/"message">
 
 =item *
 
-XXX L<message|perldiag/"message">
+L<Missing ']' in prototype for %s : %s|perldiag/"Missing ']' in prototype
+for %s : %s">
+
+(W illegalproto) A grouping was started with C<[> but never closed with
+C<]>.
 
 =back
 
@@ -270,6 +280,37 @@ Under rare circumstances, one could get a "Can't coerce readonly REF to
 string" instead of the customary "Modification of a read-only value".  This
 alternate error message has been removed.
 
+=item *
+
+"Ambiguous use of * resolved as operator *": This and similar warnings
+about "%" and "&" used to occur in some circumstances where there was no
+operator of the type cited, so the warning was completely wrong.  This has
+been fixed [perl #117535, #76910].
+
+=item *
+
+Warnings about malformed subroutine prototypes are now more consistent in
+how the prototypes are rendered.  Some of these warnings would truncate
+prototypes containing nulls.  In other cases one warning would suppress
+another.  The warning about illegal characters in prototypes no longer says
+"after '_'" if the bad character came before the underscore.
+
+=item *
+
+L<Perl folding rules are not up-to-date for 0x%X; please use the perlbug
+utility to report; in regex; marked by <-- HERE in
+mE<sol>%sE<sol>|perldiag/"Perl folding rules are not up-to-date for 0x%X;
+please use the perlbug utility to report; in regex; marked by <-- HERE in
+m/%s/">
+
+This message is now only in the regexp category, and not in the deprecated
+category.  It is still a default (i.e., severe) warning [perl #89648].
+
+=item *
+
+The debugger's "n" command now respects lvalue subroutines and steps over
+them [perl #118839].
+
 =back
 
 =head1 Utility Changes
@@ -516,6 +557,85 @@ was magically converted into an IO thingy, possibly resulting in "Bizarre
 copy" errors if that scalar continued to be used elsewhere.  Now Perl uses
 an internal copy of the scalar instead.
 
+=item *
+
+Undefining an inlinable lexical subroutine (C<my sub foo() { 42 } undef
+&foo>) would result in a crash if warnings were turned on.
+
+=item *
+
+Certain uses of the C<sort> operator are optimised to modify an array in
+place, such as C<@a = sort @a>.  During the sorting, the array is made
+read-only.  If a sort block should happen to die, then the array remained
+read-only even outside the C<sort>.  This has been fixed.
+
+=item *
+
+C<$a> and C<$b> inside a sort block are aliased to the actual arguments to
+C<sort>, so they can be modified through those two variables.  This did not
+always work, e.g., for lvalue subs and C<$#ary>, and probably many other
+operators.  It works now.
+
+=item *
+
+The arguments to C<sort> are now all in list context.  If the C<sort>
+itself were called in void or scalar context, then I<some>, but not all, of
+the arguments used to be in void or scalar context.
+
+=item *
+
+Subroutine prototypes with Unicode characters above U+00FF were getting
+mangled during closure cloning.  This would happen with subroutines closing
+over lexical variables declared outside, and with lexical subs.
+
+=item *
+
+In regular expressions containing multiple code blocks, the values of
+C<$1>, C<$2>, etc., set by nested regular expression calls would leak from
+one block to the next.  Now these variables always refer to the outer
+regular expression at the start of an embedded block [perl #117917].
+
+=item *
+
+C<UNIVERSAL::can> now treats its first argument the same way that method
+calls do: Typeglobs and glob references with non-empty IO slots are treated
+as handles, and strings are treated as filehandles, rather than packages,
+if a handle with that name exists [perl #113932].
+
+=item *
+
+Method calls on typeglobs (e.g., C<< *ARGV->getline >>) used to stringify
+the typeglob and then look it up again.  Combined with changes in Perl
+5.18.0, this allowed C<< *foo->bar >> to call methods on the "foo" package
+(like C<< foo->bar >>).  In some cases it could cause the method to be
+called on the wrong handle.  Now a typeglob argument is treated as a
+handle (just like C<< (\*foo)->bar >>), or, if its IO slot is empty, an
+error is raised.
+
+=item *
+
+Under copy-on-write builds (the default as of 5.19.1) C<${'_<-e'}[0]> no
+longer gets mangled.  This is the first line of input saved for the
+debugger's use for one-liners [perl #118627].
+
+=item *
+
+Assigning a vstring to a tied variable or to a subroutine argument aliased
+to a nonexistent hash or array element now works, without flattening the
+vstring into a regular string.
+
+=item *
+
+C<pos>, C<tie>, C<tied> and C<untie> did not work
+properly on subroutine arguments aliased to nonexistent
+hash and array elements [perl #77814, #27010].
+
+=item *
+
+The C<< => >> fat arrow operator can now quote built-in keywords even if it
+occurs on the next line, making it consistent with how it treats other
+barewords.
+
 =back
 
 =head1 Known Problems