X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/b10de59c4daa1cc55b63aa6d28f9b97c47d4cd99..a83beb4335050b314e601c8ec224be61aa0b5f02:/pod/perldelta.pod diff --git a/pod/perldelta.pod b/pod/perldelta.pod index bdcd32e..b298485 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -2,2953 +2,390 @@ =head1 NAME -perldelta - what is new for perl v5.26.0 +[ this is a template for a new perldelta file. Any text flagged as XXX needs +to be processed before release. ] -=head1 DESCRIPTION - -This document describes the differences between the 5.24.0 release and the -5.26.0 release. - -=head1 Notice - -This release includes three 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<< Removal of the current directory (C<.>) from C<@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>. - -=item * In regular expression patterns, a literal left brace C<"{"> -should be escaped - -See L characters in regular expression patterns are no longer permissible>. - -=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 -that it should look for /^\s*$DELIM\n/ as the closing delimiter. - -These syntaxes are all supported: - - <<~EOF; - <<~\EOF; - <<~'EOF'; - <<~"EOF"; - <<~`EOF`; - <<~ 'EOF'; - <<~ "EOF"; - <<~ `EOF`; - -The '~' modifier will strip, from each line in the here-doc, the -same whitespace that appears before the delimiter. - -Newlines will be copied as-is, and lines that don't include the -proper beginning whitespace will cause perl to croak. - -For example: - - if (1) { - print <<~EOF; - Hello there - EOF - } - -prints "Hello there\n" with no leading whitespace. - -=head2 @{^CAPTURE}, %{^CAPTURE}, and %{^CAPTURE_ALL} - -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. - -C<%{^CAPTURE}> is the equivalent to C<%+> (I, named captures). Other than -being more self documenting there is no difference between the two forms. - -C<%{^CAPTURE_ALL}> is the equivalent to C<%-> (I, all named captures). -Other than being more self documenting there is no difference between the -two forms. - -=head2 Unicode 9.0 is now supported - -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 Use of C<\p{I