X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/66d813ca37e809ee893f2444cd6319914ce913e0..a5de0aae2a3699e3805d679956f9547c5049ecce:/pod/perldelta.pod diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 24eebb9..e61dd43 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -1,19 +1,27 @@ =encoding utf8 +=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 + =head1 NAME [ 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.19.2 +perldelta - what is new for perl v5.19.3 =head1 DESCRIPTION -This document describes differences between the 5.19.1 release and the 5.19.2 +This document describes differences between the 5.19.2 release and the 5.19.3 release. -If you are upgrading from an earlier release such as 5.19.0, first read -L, which describes differences between 5.19.0 and 5.19.1. +If you are upgrading from an earlier release such as 5.19.1, first read +L, which describes differences between 5.19.1 and 5.19.2. =head1 Notice @@ -25,20 +33,15 @@ 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 section. -=head2 More consistent prototype parsing +[ List each enhancement as a =head2 entry ] + +=head2 B<-F> now implies B<-a> and B<-a> implies B<-n> -Multiple semicolons in subroutine prototypes have long been tolerated and -treated as a single semicolon. There was one case where this did not -happen. A subroutine whose prototype begins with "*" or ";*" can affect -whether a bareword is considered a method name or sub call. This now -applies also to ";;;*". +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. -Whitespace has long been allowed inside subroutine prototypes, so -C is equivalent to C. But it was stripped when the -subroutine was parse. Hence, whitespace was I allowed in prototypes -set by C. Now it is permitted, and the parser -no longer strips whitespace. This means C returns the -original prototype, whitespace and all. +You can still use B<-p> for its extra behaviour. [perl #116190] =head1 Security @@ -132,42 +135,107 @@ XXX =item * -L has been upgraded from version 1.30 to 1.31 +L has been upgraded from version 1.44 to 1.45. + +Calling the C method on C objects created from a lexical +sub would return nonsense, possibly crashing perl. C now returns +C for lexical subs. [perl #118525] + +Added the C method to return the name of a lexical sub. + +=item * + +L has been upgraded from version 0.35 to 0.36. + +L wasn't correctly updating an internal variable when Cd +with a C option. + +=item * + +L has been upgraded from 1.30 to 1.31 + +L now handles objects with string overloads. It also allows objects +to specify how they appear in the stack dump with a C method, +and also allows the user to specify their own formatter for objects without +C as well as other references. [perl #92446] + +=item * + +L has been upgraded from 2.061 to 2.062. + +=item * + +L has been upgraded from 2.061 to 2.062. + +=item * + +L has been upgraded from version 0.18 to 0.19. + +=item * + +L has been upgraded from version 2.147 to 2.148. + +The compatbility of the XS implementation with the pure perl version +under C has been improved. [perl #118933] + +=item * + +L has been upgraded from version 1.12 to 1.13. + +The C and C functions have been +removed and C will now work on non-scalars. [perl #117793] + +=item * + +L has been upgraded from version 5.68 to 5.69. + +L would ignore custom C<$SIG{__WARN__}> handlers in +C. [perl #39739] + +=item * -The generated C code now incorporates bug fixes present in -F, and has whitespace changes. It now uses -C<#include "..."> for header files instead of C<< #include <...> >>. -This should not make any difference, unless programs embedding C -happen to have local and incompatible files named F, F or -F, as these will now be picked up instead of the installed Perl -headers. +The IO-Compress module collection has been upgraded from 2.061 to 2.062. =item * -L has been upgraded and given a version of 1. -Previously it did not have a version number. +L has been upgraded from version 0.82 to 0.84. + +C has various fixes/improvements, L is only used where +needed and a regression introduced in 0.78 has been fixed. -C now takes an optional first argument. A reference to a scalar -is treated as a filename to be opened and written to. Any other reference is -used as the filehandle to write to. Otherwise the existing default remains, -to write to C. +=item * -C has been refactored to use functions from L, -reducing code size and duplication. The internal function C has been -deleted. +The libnet module collection has been upgraded from version 1.22 to 1.23. =item * -L has been upgraded from version 1.33 to 1.34. +L has been upgraded from version 1.27 to 1.30 -C will no longer infinitely recurse if the shared -object fails to load. +L now includes C, C, C, C, +C and C functions that operate on even-sized lists of +pairs. =item * -L has been upgraded from version 2.43 to 2.44. +L has been upgraded from version 0.225 to 0.226. -Calling C hooks no longer leaks memory. [perl #118829] +=item * + +L has been upgraded from version 2.010 to 2.011. + +Handle FreeBSD (or other platforms) returning shorter AF_UNIX sockaddr +structures due to embedded sun_len. [cpan #86613] + +=item * + +L has been upgraded from version 2.45 to 2.46. + +Avoid creating temporary objects for STORABLE_attach when they aren't +required. [perl #118907] + +=item * + +L has been upgraded from version 1.21 to 1.22. =back @@ -200,27 +268,19 @@ XXX Changes which significantly change existing files in F go here. However, any changes to F should go in the L section. -=head3 L +=head3 L =over 4 =item * -Code in regular expressions, regular expression backtracking verbs, -and lvalue subroutines are no longer listed as experimental. (This -also affects L and L.) - -=back - -=head3 L - -=over 4 - -=item * - -Since Perl v5.10, it has been possible for subroutines in @INC to return -a reference to a scalar holding initial source code to prepend to the file. -This is now documented. +The C 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. A "more than +you ever wanted to know about C" document may follow in subsequent +versions of perl. =back @@ -254,11 +314,7 @@ XXX L =item * -L - -(W illegalproto) A grouping was started with C<[> but never closed with -C<]>. +XXX L =back @@ -270,40 +326,7 @@ XXX Changes (i.e. rewording) of diagnostic messages go here =item * -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%sE|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]. +XXX Describe change here =back @@ -339,32 +362,7 @@ L section, instead. =item * -F and F's option handling has been refactored to use -L. Both are used by the F C targets, and -are not installed, so these changes are only likely to affect custom -installation scripts. - -=over 4 - -=item * - -single letter options now also have long names - -=item * - -invalid options are now rejected - -=item * - -command line arguments that are not options are now rejected - -=item * - -Each now has a C<--help> option to display the usage message. - -=back - -The behaviour for all valid documented invocations is unchanged. +XXX =back @@ -429,12 +427,9 @@ L section. =over 4 -=item MidnightBSD +=item XXX-some-platform -C was removed from version 0.4-RELEASE of MidnightBSD and had been -deprecated on earlier versions. This caused the build environment to be -erroneously configured for C rather than C. This has been now -been corrected. +XXX =back @@ -450,55 +445,8 @@ well. =item * -The Makefile shortcut targets for many rarely (or never) used testing and -profiling targets have been removed, or merged into the only other Makefile -target that uses them. Specifically, these targets are gone, along with -documentation that referenced them or explained how to use them: - - check.third check.utf16 check.utf8 coretest minitest.prep - minitest.utf16 perl.config.dashg perl.config.dashpg - perl.config.gcov perl.gcov perl.gprof perl.gprof.config - perl.pixie perl.pixie.atom perl.pixie.config perl.pixie.irix - perl.third perl.third.config perl.valgrind.config purecovperl - pureperl quantperl test.deparse test.taintwarn test.third - test.torture test.utf16 test.utf8 test_notty.deparse - test_notty.third test_notty.valgrind test_prep.third - test_prep.valgrind torturetest ucheck ucheck.third ucheck.utf16 - ucheck.valgrind utest utest.third utest.utf16 utest.valgrind - -It's still possible to run the relevant commands by "hand" - no underlying -functionality has been removed. - -=item * - -It is now possible to keep Perl from initializing locale handling. -For the most part, Perl doesn't pay attention to locale. (See -L.) Nonetheless, until now, on startup, it has always -initialized locale handling to the system default, just in case the -program being executed ends up using locales. (This is one of the first -things a locale-aware program should do, long before Perl knows if it -will actually be needed or not.) This works well except when Perl is -embedded in another application which wants a locale that isn't the -system default. Now, if the environment variable -C is set at the time Perl is started, this -initialization step is skipped. Prior to this, on Windows platforms, -the only workaround for this deficiency was to use a hacked-up copy of -internal Perl code. Applications that need to use older Perls can -discover if the embedded Perl they are using needs the workaround by -testing that the C preprocessor symbol C is not -defined. (RT #38193) - -=item * - -C and C have been removed. They were not used anywhere -and are not part of the API. For XS modules, they are now #defined as 0. - -=item * - -C, which usually croaks on read-only values, used to allow -read-only values to be modified at compile time. This has been changed to -croak on read-only values regardless. This change uncovered several core -bugs. +C has been added to the API. It is similar to +C, but supports long strings on 64-bit platforms. =back @@ -513,104 +461,85 @@ files in F and F are best summarized in L. =item * -There have been several fixes related to Perl's handling of locales. perl -#38193 was described above in L. -Also fixed is #112208 in which the error string in C<$!> displayed as -garbage in many UTF-8 locales; -#118197, where the radix (decimal point) character had to be an ASCII -character (which doesn't work for some non-Western languages); -and #115808, in which C on failure returned an -C which didn't warn about not being defined even if those -warnings were enabled. - -=item * - -The dtrace sub-entry probe now works with lexical subs, instead of -crashing [perl #118305]. - -=item * - -Compiling a C operator whose third argument is a named constant -evaulating to 0 no longer causes the constant's value to change. +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 * -A named constant used as the second argument to C no longer gets -coerced to a string if it is a reference, regular expression, dualvar, etc. +On 64-bit platforms C can now be set to a value higher than 2**31-1 +[perl #72766]. =item * -A named constant evaluating to the undefined value used as the second -argument to C no longer produces "uninitialized" warnings at compile -time. It will still produce them at run time. +Perl used to leak an implementation detail when it came to referencing the +return values of certain operators. C +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). This has been fixed [perl #21979, #78194, +#89188, #109746, #114838, #115388]. =item * -When a scalar was returned from a subroutine in @INC, the referenced scalar -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. +The range operator C<..> was returning the same modifiable scalars with +each call, unless it was the only thing in a C 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 * -Undefining an inlinable lexical subroutine (C) would result in a crash if warnings were turned on. +Constant folding and subroutine inlining no longer cause operations that +would normally return new modifiable scalars to return read-only values +instead. =item * -Certain uses of the C 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. This has been fixed. +Closures of the form C are no longer inlined, +causing changes to the variable to be ignored by callers of the subroutine +[perl #79908]. =item * -C<$a> and C<$b> inside a sort block are aliased to the actual arguments to -C, 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. +Return values of certain operators such as C would sometimes be shared +between recursive calls to the same subroutine, causing the inner call to +modify the value returned by C in the outer call. This has been +fixed. =item * -The arguments to C are now all in list context. If the C -itself were called in void or scalar context, then I, but not all, of -the arguments used to be in void or scalar context. +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. =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. +C was broken in Perl 5.18.0; the C

flag was ignored. This has +been fixed [perl #118213]. =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]. +Starting in v5.18.0, a construct like C would have its C<#> +incorrectly interpreted as a comment. The code block would be skipped, +unparsed. This has been corrected. =item * -C 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]. +Starting in Perl 5.001, a regular expression like C or +C would have its C<#> incorrectly interpreted as a comment, so +the variable would not interpolate. This has been corrected [perl #45667]. =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. +On non-threaded builds, setting C<${"_ 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 * -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]. +Enabling "used once" warnings no longer causes crashes on stash +circularities created at compile time (C<*Foo::Bar::Foo:: = *Foo::>). =back @@ -639,7 +568,7 @@ here. XXX Generate this with: - perl Porting/acknowledgements.pl v5.19.1..HEAD + perl Porting/acknowledgements.pl v5.19.2..HEAD =head1 Reporting Bugs