From 8eea68ac3e5b19edbd09f34f4c8a436777552dc9 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 29 May 2022 23:46:46 +0200 Subject: [PATCH] perl: summarise v5.36 release notes --- perl.inc.pl | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/perl.inc.pl b/perl.inc.pl index 9d416eb..caaf912 100644 --- a/perl.inc.pl +++ b/perl.inc.pl @@ -159,7 +159,7 @@ use utf8; v5.18 => { new => [ ['${^LAST_FH}', 'last read filehandle (used by $.)'], - ['/(?[ a + b ])/', 'regex set operations (character substraction -, unions &)', {experimental => 'regex_sets'}], + ['/(?[ a + b ])/', 'regex set operations (character subtraction -, union +, intersection &, xor ^)', {experimental => 'regex_sets', stable => v5.36}], ['my sub', 'lexical subroutines (also state, our); buggy before v5.22', {experimental => 'lexical_subs', stable => v5.26}], ['next $expression', 'loop controls allow runtime expressions'], [q"no warnings 'experimental::…'", 'mechanism for experimental features, as of now required for smartmatch'], @@ -174,7 +174,7 @@ use utf8; v5.20 => { new => [ - ['sub ($var)', 'subroutine signatures', {feature => 'signatures', experimental => 'signatures'}], + ['sub ($var)', 'subroutine signatures', {feature => 'signatures', experimental => 'signatures', stable => v5.36}], ['%hash{…}', 'hash slices return key+value pairs'], ['[]->@*', 'postfix dereferencing (also e.g. $scalar->$* for $$scalar)', {feature => 'postderef, postderef_qq', experimental => 'postderef', stable => v5.23.1}], [q"use warnings 'once'; $a", 'variables $a and $b are exempt from used once warnings'], @@ -242,7 +242,7 @@ use utf8; ['/(*…)/', 'alphabetic synonyms for assertions, e.g. (*atomic:…) for (?>…) and (*nlb:…) for (?<!…)', {experimental => 'alpha_assertions', stable => v5.31.6}], ['/(*script_run:)/', 'enforces all characters to be from the same script', {experimental => 'script_run', stable => v5.31.6}], ['state @a', 'persistent lexical array or hash variables'], - ['perl -i -pe die', 'safe in-place editing: files are replaced only after successful completion'], + ['perl -i -pe die', 'safe in-place editing: files are replaced only after successful completion'], ['${^SAFE_LOCALES}', 'locales are thread-safe on supported systems, indicated by this variable'], ], unicode => '10.0', @@ -253,7 +253,7 @@ use utf8; v5.30 => { new => [ - ['/(?<=var+)', 'variable length lookbehind assertions', {experimental => 'vlb'}], + ['/(?<=var+)', 'variable length lookbehind assertions', {experimental => 'vlb', stable => v5.36}], ['m(\p{nv=/.*/})', 'match unicode properties by regular expressions', {experimental => 'uniprop_wildcards'}], ['my $state if 0', 'workaround for state (deprecated since v5.10!) is now prohibited'], [q"qr'\N'", 'Delimiters must be graphemes; unescaped { illegal; \N in single quotes'], @@ -264,7 +264,7 @@ use utf8; v5.32 => { new => [ - ['isa', 'infix operator to check class instance'], + ['isa', 'infix operator to check class instance', {feature => 'isa', experimental => 'isa', stable => v5.36}], ['$min < $_ <= $max', 'chained comparison repeats inner part as $min < $_ and $_ <= $max'], ['/\p{Name=$var}/', 'match Unicode Name property like \N{} but with interpolation and subpatterns'], [q"open F, '+>>', undef", 'respect append mode on temporary files with mixed access'], @@ -278,12 +278,29 @@ use utf8; v5.34 => { new => [ - ['try {} catch', 'exception handling similar to eval blocks', {experimental => 'try'}], + ['try {} catch', 'exception handling similar to eval blocks', {feature => 'try', experimental => 'try'}], ['/{,n}/', 'empty lower bound quantifier is accepted as shorthand for 0'], ['\x{ … }', 'insignificant space within curly braces, also for \b{}, \g{}, \k{}, \N{}, \o{} as well as /{m,n}/ quantifiers'], ['0o0', 'octal prefix 0o alternative to 0… and oct'], ['re::optimization(qr//)', 'debug regular expression optimization information discovered at compile time'], + ['no feature …', 'disable discouraged practices of bareword_filehandles and multidimensional array emulation'], ], release => '2021-05-20', }, + v5.36 => { + new => [ + ['use v5.36', "use warnings; use feature qw'signatures isa'; no feature qw'indirect multidimensional switch'"], + ['use builtin', 'namespace for interpreter functions, such as weaken and blessed from Scalar::Util, ceil/floor from POSIX, and trim like String::Util', {experimental => 'builtin'}], + ['is_bool(!0)', 'distinguish scalar variable types (by builtin functions) for data interoperability'], + ['for my ($k, $v) (%hash)', 'iterate over multiple values at a time (including builtin::indexed for arrays)', {experimental => 'for_list', feature => 'for_list'}], + ['defer {}', 'queue code to be executed when going out of scope', {feature => 'defer', experimental => 'defer'}], + ['try {} finally {}', 'run code at the end of a try construct regardless of failure', {feature => 'try', experimental => 'try'}], + ['q«…»', 'unicode delimiters for quoting operators', {experimental => 'extra_paired_delimiters'}], + ['sub ($var) {!pop}', 'signatured subs are stable, but mixing with the arguments array @_ remains experimental', {feature => 'signatures', experimental => 'args_array_with_signatures'}], + ['$SIG{FPE}', 'floating-point exceptions no longer deferred but delivered immediately like other signals'], + ['perl -g', 'disable input record separator (slurp mode), alias for -0777'], + ], + unicode => '14.0', + release => '2022-05-28', + }, } -- 2.30.0