In perl.git, the branch perldelta has been updated <http://perl5.git.perl.org/perl.git/commitdiff/7a71bf978ccb0dbe08566e0941e6e371c003bfbf?hp=952551ff6e2b4d1694aa35b07988da9ce1386236>
- Log ----------------------------------------------------------------- commit 7a71bf978ccb0dbe08566e0941e6e371c003bfbf Author: Ricardo Signes <r...@cpan.org> Date: Thu Mar 10 20:03:27 2016 -0500 perldelta: merge in changes from perl5235delta M Porting/perl5240delta.pod commit 6cca8214d0c106651fc0864806237323c18e22d3 Author: Ricardo Signes <r...@cpan.org> Date: Thu Mar 10 19:50:06 2016 -0500 perldelta: merge in changes from perl5234delta M Porting/perl5240delta.pod ----------------------------------------------------------------------- Summary of changes: Porting/perl5240delta.pod | 391 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 391 insertions(+) diff --git a/Porting/perl5240delta.pod b/Porting/perl5240delta.pod index 712c2d4..b432688 100644 --- a/Porting/perl5240delta.pod +++ b/Porting/perl5240delta.pod @@ -129,6 +129,23 @@ C<$Carp::MaxArgNums> is supposed to be the number of arguments to display. Prior to this version, it was instead showing C<$Carp::MaxArgNums> + 1 arguments, contrary to the documentation. +=head2 Lexical $_ has been removed + +C<my $_> was introduced in Perl 5.10, and subsequently caused much confusion +with no obvious solution. In Perl 5.18.0, it was made experimental on the +theory that it would either be removed or redesigned in a less confusing (but +backward-incompatible) way. Over the following years, no alternatives were +proposed. The feature has now been removed and will fail to compile. + +=head2 Only blanks and tabs are now allowed within C<[...]> within C<(?[...])>. + +The experimental Extended Bracketed Character Classes can contain regular +bracketed character classes within them. These differ from regular ones in +that white space is generally ignored, unless escaped by preceding it with a +backslash. The white space that is ignored is now limited to just tab C<\t> +and SPACE characters. Previously, it was any white space. See +L<perlrecharclass/Extended Bracketed Character Classes>. + =head1 Deprecations =head2 sysread(), syswrite(), recv() and send() are deprecated on @@ -174,6 +191,39 @@ Single arguments in list assign are now slightly faster: ($x) = (...); (...) = ($x); +=item * + +C</fixed-substr/> has been made much faster. + +On platforms with a libc memchr() implementation which makes good use of +underlying hardware support, patterns which include fixed substrings will now +often be much faster; for example with glibc on a recent x86_64 CPU, this: + + $s = "a" x 1000 . "wxyz"; + $s =~ /wxyz/ for 1..30000 + +is now about 7 times faster. On systems with slow memchr(), e.g. 32-bit ARM +Raspberry Pi, there will be a small or little speedup. Conversely, some +pathological cases, such as C<"ab" x 1000 =~ /aa/> will be slower now; up to 3 +times slower on the rPi, 1.5x slower on x86_64. + +=item * + +Faster addition, subtraction and multiplication. + +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. + +=item * + +Faster preincrement, predecrement, postincrement, postdecrement. + +By internally splitting the functions which handled multiple +cases into different functions. + =back =head1 Modules and Pragmata @@ -323,6 +373,50 @@ exports anything. [perl #125410] =head2 Changes to Existing Documentation +=head3 L<perlapi> + +=over 4 + +=item * + +The process of using undocumented globals has been documented, namely, that one +should send email to L<perl5-port...@perl.org|mailto:perl5-port...@perl.org> +first to get the go-ahead for documenting and using an undocumented function or +global variable. + +=back + +=head3 L<perlsub> + +=over 4 + +=item * + +Updated to note that anonymous subroutines can have signatures. + +=back + +=head3 L<perltie> + +=over 4 + +=item * + +The usage of C<FIRSTKEY> and C<NEXTKEY> has been clarified. + +=back + +=head3 L<perlvar> + +=over 4 + +=item * + +The specific true value of C<$!{E...}> is now documented, noting that it is +subject to change and not guaranteed. + +=back + =head3 L<perlcall> =over 4 @@ -417,11 +511,27 @@ sense. =item * +L<Can't find Unicode property definition "%s" in regex;|perldiag/"Can't find Unicode property definition "%s" in regex; marked by <-- HERE in m/%s/"> + +=item * + L<Can't redeclare "%s" in "%s"|perldiag/"Can't redeclare "%s" in "%s""> (F) A "my", "our" or "state" declaration was found within another declaration, such as C<my ($x, my($y), $z)> or C<our (my $x)>. +=item * + +L<Character following \p must be '{' or a single-character Unicode property name in regex;|perldiag/"Character following \%c must be '{' or a single-character Unicode property name in regex; marked b ... [21 chars truncated] + +=item * + +L<Illegal user-defined property name|perldiag/"Illegal user-defined property name"> + +=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>" >>> + =back =head3 New Warnings @@ -462,6 +572,21 @@ are called on handle with the C<:utf8> layer. The diagnostic C<< Hexadecimal float: internal error >> has been changed to C<< Hexadecimal float: internal error (%s) >> to include more information. +=item * + +L<Can't modify non-lvalue subroutine call of &%s|perldiag/"Can't modify non-lvalue subroutine call of &%s"> + +This error now reports the name of the non-lvalue subroutine you attempted to +use as an lvalue. + +=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" >> + =back =head1 Configuration and Compilation @@ -470,6 +595,44 @@ C<< Hexadecimal float: internal error (%s) >> to include more information. =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. + +=item * + +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. + +=item * + +C<< PPPort.so/PPPort.dll >> no longer get installed, as they are +not used by C<< PPPort.pm >>, only by its test files. + +=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 >>. + + +=item * + +Using the C<NO_HASH_SEED> define in combination with the default hash algorithm +C<PERL_HASH_FUNC_ONE_AT_A_TIME_HARD> resulted in a fatal error while compiling +the interpreter, since Perl 5.17.10. This has been fixed. + +=item * + +If you had F<Configure> hints for C<d_procselfexe> or C<procselfexe>, they were +probably broken by the AmigaOS changes in Perl 5.23.3. This has been now +fixed. +L<[perl #126152]|https://rt.perl.org/Ticket/Display.html?id=126152> + +=item * + F<Configure> should handle spaces in paths a little better. =back @@ -496,6 +659,111 @@ Win32 compilers are supported. =over 4 +=item IRIX + +=over + +=item * + +Under some circumstances IRIX stdio fgetc() and fread() set the errno to +C<ENOENT>, which made no sense according to either IRIX or POSIX docs. Errno +is now cleared in such cases. +L<[perl #123977]|https://rt.perl.org/Ticket/Display.html?id=123977> + +=item * + +Problems when multiplying long doubles by infinity have been fixed. +L<[perl #126396]|https://rt.perl.org/Ticket/Display.html?id=126396> + +=back + +=item MacOS X + +=over + +=item * + +Until now OS X builds of perl have specified a link target of 10.3 (Panther, +2003) but have not specified a compiler target. From now on, builds of perl on +OS X 10.6 or later (Snow Leopard, 2008) by default capture the current OS X +version and specify that as the explicit build target in both compiler and +linker flags, thus preserving binary compatibility for extensions built later +regardless of changes in OS X, SDK, or compiler and linker versions. To +override the default value used in the build and preserved in the flags, +specify C<export MACOSX_DEPLOYMENT_TARGET=10.N> before configuring and building +perl, where 10.N is the version of OS X you wish to target. In OS X 10.5 or +earlier there is no change to the behavior present when those systems were +current; the link target is still OS X 10.3 and there is no explicit compiler +target. + +=back + +=item Tru64 + +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 >>. + +=item VMS + +=over + +=item * + +Perl now implements its own C<killpg> by scanning for processes in the +specified process group, which may not mean exactly the same thing as a Unix +process group, but allows us to send a signal to a parent (or master) process +and all of its sub-processes. At the perl level, this means we can now send a +negative pid like so: + + kill SIGKILL, -$pid; + +to signal all processes in the same group as C<$pid>. + +=back + +=item Win32 + +=over + +=item * + +A new build option C<USE_NO_REGISTRY> has been added to the makefiles. This +option is off by default, meaning the default is to do Windows registry +lookups. This option stops Perl from looking inside the registry for anything. +For what values are looked up in the registry see L<perlwin32>. Internally, in +C, the name of this option is C<WIN32_NO_REGISTRY>. + +=item * + +The behavior of Perl using C<HKEY_CURRENT_USER\Software\Perl> and +C<HKEY_LOCAL_MACHINE\Software\Perl> to lookup certain values, including C<%ENV> +vars starting with C<PERL> has changed. Previously, the 2 keys were checked +for entries at all times through Perl processes life time even if they did not +exist. For performance reasons, now, if the root key (i.e. +C<HKEY_CURRENT_USER\Software\Perl> or C<HKEY_LOCAL_MACHINE\Software\Perl>) does +not exist at process start time, it will not be checked again for C<%ENV> +override entries for the remainder of the Perl processes life. This more +closely matches Unix behaviour in that the environment is copied or inherited +on startup and changing the variable in the parent process or another process +or editing F<.bashrc> will not change the environmental variable in other +existing, running, processes. + +=item * + +One glob fetch was removed for each C<-X> or C<stat> call whether done from +Perl code or internally from Perl's C code. The glob being looked up was +C<${^WIN32_SLOPPY_STAT}> which is a special variable. This makes C<-X> and +C<stat> slightly faster. + +=item * + +During miniperl's process startup, during the build process, 4 to 8 IO calls +related to the process starting F<.pl> and the F<buildcustomize.pl> file were +removed from the code opening and executing the first 1 or 2 F<.pl> files. + +=back + =item EBCDIC =over 4 @@ -569,6 +837,28 @@ Perl 5.22.1. =item * +C<< sv_ref() >> is now part of the API. + +=item * + +L<perlapi/sv_backoff> had its return type changed from C<int> to C<void>. It +previously has always returned C<0> since Perl 5.000 stable but that was +undocumented. Although C<sv_backoff> is marked as public API, XS code is not +expected to be impacted since the proper API call would be through public API +C<sv_setsv(sv, &PL_sv_undef)>, or quasi-public C<SvOOK_off>, or non-public +C<SvOK_off> calls, and the return value of C<sv_backoff> was previously a +meaningless constant that can be rewritten as C<(sv_backoff(sv),0)>. + +=item * + +The C<EXTEND> and C<MEXTEND> macros have been improved to avoid various issues +with integer truncation and wrapping. In particular, some casts formerly used +within the macros have been removed. This means for example that passing an +unsigned nitems argument is likely to raise a compiler warning now (it's always +been documented to require a signed value; formerly int, lately SSize_t). + +=item * + C<PL_sawalias> and C<GPf_ALIASED_SV> have been removed. =item * @@ -583,6 +873,107 @@ C<GvASSIGN_GENERATION> and C<GvASSIGN_GENERATION_set> have been removed. =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. + +=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] + +=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] + +=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. + +=item * + +Improved parsing of hex float constants. + +=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] + +=item * + +Fixed several cases where perl would abort due to a segmentation fault, +or a C-level assert. [perl #126615], [perl #126602], [perl #126193]. + +=item * + +There were places in regular expression patterns where comments (C<(?#...)>) +weren't allowed, but should have been. This is now fixed. +L<[perl #116639]|https://rt.perl.org/Ticket/Display.html?id=116639> + +=item * + +Some regressions from Perl 5.20 have been fixed, in which some syntax errors in +L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes> constructs +within regular expression patterns could cause a segfault instead of a proper +error message. +L<[perl #126180]|https://rt.perl.org/Ticket/Display.html?id=126180> +L<[perl #126404]|https://rt.perl.org/Ticket/Display.html?id=126404> + +=item * + +Another problem with +L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes> +constructs has been fixed wherein things like C<\c]> could cause panics. +L<[perl #126181]|https://rt.perl.org/Ticket/Display.html?id=126181> + +=item * + +Some problems with attempting to extend the perl stack to around 2G or 4G +entries have been fixed. This was particularly an issue on 32-bit perls built +to use 64-bit integers, and was easily noticeable with the list repetition +operator, e.g. + + @a = (1) x $big_number + +Formerly perl may have crashed, depending on the exact value of C<$big_number>; +now it will typically raise an exception. +L<[perl #125937]|https://rt.perl.org/Ticket/Display.html?id=125937> + +=item * + +In a regex conditional expression C<(?(condition)yes-pattern|no-pattern)>, if +the condition is C<(?!)> then perl failed the match outright instead of +matching the no-pattern. This has been fixed. +L<[perl #126222]|https://rt.perl.org/Ticket/Display.html?id=126222> + +=item * + +The special backtracking control verbs C<(*VERB:ARG)> now all allow an optional +argument and set C<REGERROR>/C<REGMARK> appropriately as well. +L<[perl #126186]|https://rt.perl.org/Ticket/Display.html?id=126186> + +=item * + +Several bugs, including a segmentation fault, have been fixed with the bounds +checking constructs (introduced in Perl 5.22) C<\b{gcb}>, C<\b{sb}>, C<\b{wb}>, +C<\B{gcb}>, C<\B{sb}>, and C<\B{wb}>. All the C<\B{}> ones now match an empty +string; none of the C<\b{}> ones do. +L<[perl #126319]|https://rt.perl.org/Ticket/Display.html?id=126319> + +=item * + Duplicating a closed file handle for write no longer creates a filename of the form F<GLOB(0xXXXXXXXX)>. [perl #125115] -- Perl5 Master Repository