From a668d95d135825e04289106c9a7b73096709eb2d Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 26 Aug 2024 22:27:10 +0200 Subject: [PATCH] perl: bundled features in older version --- perl.inc.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/perl.inc.pl b/perl.inc.pl index 3ee4eb4..b0f9ec8 100644 --- a/perl.inc.pl +++ b/perl.inc.pl @@ -107,10 +107,11 @@ my $wbr = "\N{ZERO WIDTH SPACE}"; v5.10 => { new => [ + ['use v5.10', 'minimal perl version with bundled features (pragma to lexically enable backwards-incompatible syntax)'], ['//', 'defined-or operator'], ['~~', 'smart-match operator to compare different data types (updated in v5.10.1)', {experimental => 'smartmatch'}], - ['say', 'print with newline, equivalent to print @_, "\n"', {feature => 'say'}], - ['given', 'switch statement to smart-match with when/default', {name => 'switch', feature => 'switch', experimental => 'smartmatch'}], + ['say', 'print with newline, equivalent to print @_, "\n"', {feature => 'say', bundle => 0}], + ['given', 'switch statement to smart-match with when/default', {name => 'switch', feature => 'switch', bundle => 0, experimental => 'smartmatch'}], ['/(?<name>)/', 'named capture buffers into %+'], ['/(?1)/', 'recursive regular expression patterns'], ['/(?|)/', 'resets capture numbering for each contained branch'], @@ -119,7 +120,7 @@ my $wbr = "\N{ZERO WIDTH SPACE}"; ['/p', 'optionally preserve ${^MATCH} variables (avoiding $& penalty until COW in v5.20)'], ['/\v/, /\h/', 'vertical and horizontal whitespace escapes (\V \H to invert); also /\R/ for newlines'], ['my $_', 'lexically scoped version of the default variable', {experimental => 'lexical_topic', dropped => v5.23.4}], - ['state', 'persistent my variables (scalars only until 5.28)', {feature => 'state'}], + ['state', 'persistent my variables (scalars only until 5.28)', {feature => 'state', bundle => 0}], ], modules => [ [autodie => 'replace builtin functions to throw exceptions instead of returning failure', 'eval {open ...} or $@->matches("open") || die'], @@ -193,8 +194,8 @@ my $wbr = "\N{ZERO WIDTH SPACE}"; v5.16 => { new => [ ["no feature ${wbr}'array_base'", 'disables $[ to alter the 0 index of the first array element or substring character', {bundle => 0, dropped => v5.30}], - ['__SUB__', 'current subroutine reference', {feature => 'current_sub'}], - ['fc, "\F"', 'unicode foldcase to compare case-insensitively', {feature => 'fc'}], + ['__SUB__', 'current subroutine reference', {feature => 'current_sub', bundle => 0}], + ['fc, "\F"', 'unicode foldcase to compare case-insensitively', {feature => 'fc', bundle => 0}], ['"\N{}"', 'automatic use charnames qw( :full :short )'], ], release => '2012-05-20', @@ -229,7 +230,7 @@ my $wbr = "\N{ZERO WIDTH SPACE}"; new => [ ['sub ($var)', 'subroutine signatures', {feature => 'signatures', experimental => 'signatures', stable => v5.36, bundle => 0}], ['%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}], + ['[]->@*', 'postfix dereferencing (also e.g. $scalar->$* for $$scalar)', {feature => 'postderef, postderef_qq', experimental => 'postderef', stable => v5.24, bundle => 0}], [q"use warnings 'once'; $a", 'variables $a and $b are exempt from used once warnings'], ], unicode => '6.3', @@ -250,7 +251,7 @@ my $wbr = "\N{ZERO WIDTH SPACE}"; ['<<…>>', 'safe readline ignoring open flags in arguments'], ['/()/n', 'flag to disable numbered capturing, turning () into (?:)'], ['/\b{}/', 'boundary types: gcb (grapheme cluster), sb (sentence), wb (word)'], - ['&.', '& | ^ ~ consistently numeric, dotted operators for strings', {feature => 'bitwise', experimental => 'bitwise', stable => v5.28}], + ['&.', '& | ^ ~ consistently numeric, dotted operators for strings', {feature => 'bitwise', experimental => 'bitwise', stable => v5.28, bundle => 0}], [q"use re 'strict'", 'apply stricter syntax rules to regular expression patterns', {experimental => 're_strict'}], ['0x.beep+0', q"hexadecimal floating point notation with binary power; printf '%a' to display"], ['??', 'single match shorthand (deprecated since v5.14) requires the operator m?PATTERN?'], -- 2.30.2