X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/55a729d387b308ec6114bbbc8668efe50242d745..496db20a8409859d443bad96455ea5af468b8369:/pod/perldelta.pod diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 4656c56..b7d21d8 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -2,18 +2,52 @@ =head1 NAME -perldelta - what is new for perl v5.25.7 +perldelta - what is new for perl v5.26.0 =head1 DESCRIPTION -This document describes differences between the 5.25.6 release and the 5.25.7 -release. +This document describes the differences between the 5.24.0 release and the +5.26.0 release. -If you are upgrading from an earlier release such as 5.25.5, first read -L, which describes differences between 5.25.5 and 5.25.6. +=head1 Notice + +This release includes two updates with widespread effects: + +=over 4 + +=item * C<.> no longer in C<@INC> + +The current modules, and for the execution of scripts. See the section +L< from @INC>> for the full details. + +=item * C may now warn + +C now gives a mandatory warning when it fails to load a file which it +would have loaded had C<.> been in C<@INC>. + +=back =head1 Core Enhancements +=head2 New regular expression modifier C + +Specifying two C characters to modify a regular expression pattern +does everything that a single one does, but additionally TAB and SPACE +characters within a bracketed character class are generally ignored and +can be added to improve readability, like +S>. Details are at +Lx and Exx>. + +=head2 New Hash Function For 64-bit Builds + +We have switched to a hybrid hash function to better balance +performance for short and long keys. + +For short keys, 16 bytes and under, we use an optimised variant of +One At A Time Hard, and for longer keys we use Siphash 1-3. For very +long keys this is a big improvement in performance. For shorter keys +there is a modest improvement. + =head2 Indented Here-documents This adds a new modifier '~' to here-docs that tells the parser @@ -48,562 +82,2864 @@ prints "Hello there\n" with no leading whitespace. =head2 '.' and @INC -Perl now provides a way to build perl without C<.> in @INC by default. If you -want this feature, you can build with -Ddefault_inc_excludes_dot +Since time immemorial Perl has, as a last resort, loaded libraries +from the current directory. For security reasons this is no longer the +case, the C<@INC> variable no longer contains C<.> as its last element +by default. -Because the testing / make process for perl modules do not function well with -C<.> missing from @INC, Perl now supports the environment variable -PERL_USE_UNSAFE_INC=1 which makes Perl behave as it previously did, returning -C<.> to @INC in all child processes. +If you want to disable this behavior at compile-time build perl with +C<-Udefault_inc_excludes_dot> (C<-Ddefault_inc_excludes_dot> being the +default now). -WARNING: PERL_USE_UNSAFE_INC has been provided during the perl 5.25 development -cycle and is not guaranteed to function in perl 5.26. +If you'd like to add C<.> back to C<@INC> at runtime set +C in the environment before starting +perl. Setting it to 1 restores C<.> in the C<@INC> when perl otherwise +lacks it. + +Various toolchain modules will set C +themselves. E.g. L sets it since loading modules from a +relative path is a common idiom in test code. If you find that you +have C<.> in C<@INC> on a perl built with default settings it's likely +that your code is being invoked by a toolchain module of some sort. =head2 create a safer utf8_hop() called utf8_hop_safe() Unlike utf8_hop(), utf8_hop_safe() won't navigate before the beginning or after the end of the supplied buffer. -=head2 Fix taint handling in list assignment +=head2 @{^CAPTURE}, %{^CAPTURE}, and %{^CAPTURE_ALL} -commit v5.25.6-79-gb09ed99 reworked list assignment, and -accidentally broke taint handling at the same time. +C<@{^CAPTURE}> exposes the capture buffers of the last match as an +array. So C<$1> is C<${^CAPTURE}[0]>. This is a more efficient equivalent +to code like C, and you don't +have to keep track of the C<$matched_string> either. This variable has no +single character equivalent. Note like the other regex magic variables +the contents of this variable is dynamic, if you wish to store it beyond +the lifetime of the match you must copy it to another array. -=head2 @{^CAPTURE}, %{^CAPTURE}, and %{^CAPTURE_ALL} +C<%{^CAPTURE}> is the equivalent to C<%+> (ie named captures). Other than +being more self documenting there is no difference between the two forms. -@{^CAPTURE} exposes the capture buffers of the last match as an array. So $1 is -${^CAPTURE}[0]. +C<%{^CAPTURE_ALL}> is the equivalent to C<%-> (ie all named captures). +Other than being more self documenting there is no difference between the +two forms. -%{^CAPTURE} is the equivalent to %+ (ie named captures) +=head2 Unicode 9.0 is now supported -%{^CAPTURE_ALL} is the equivalent to %- (ie all named captures). +A list of changes is at L. +Modules that are shipped with core Perl but not maintained by p5p do not +necessarily support Unicode 9.0. L does work on 9.0. -=head2 op.c: silence compiler warning in fold_constants() +=head2 Use of C<\p{I