Remove experimental warnings from extra paired delimiters

This commit is contained in:
Paul "LeoNerd" Evans 2024-04-05 21:24:15 +00:00 committed by Paul Evans
parent 4b6ad5110c
commit a09a0269dd
9 changed files with 75 additions and 108 deletions

17
lib/feature.pm generated
View File

@ -477,12 +477,6 @@ This feature is available starting in Perl 5.36.
=head2 The 'extra_paired_delimiters' feature
B<WARNING>: This feature is still experimental and the implementation may
change or be removed in future versions of Perl. For this reason, Perl will
warn when you use the feature, unless you have explicitly disabled the warning:
no warnings "experimental::extra_paired_delimiters";
This feature enables the use of more paired string delimiters than the
traditional four, S<C<< < > >>>, S<C<( )>>, S<C<{ }>>, and S<C<[ ]>>. When
this feature is on, for example, you can say S<C<qrE<171>patE<187>>>.
@ -491,7 +485,16 @@ As with any usage of non-ASCII delimiters in a UTF-8-encoded source file, you
will want to ensure the parser will decode the source code from UTF-8 bytes
with a declaration such as C<use utf8>.
This feature is available starting in Perl 5.36.
This feature is available starting in Perl 5.36. From Perl 5.36 to 5.38,
it was classed as experimental, and Perl emitted a warning for its usage,
except when explicitly disabled:
no warnings "experimental::extra_paired_delimiters";
As of Perl 5.40, use of this feature no longer triggers a warning (though the
C<experimental::extra_paired_delimiters> warning category still exists for
compatibility with code that disables it). This feature is now considered
stable.
The complete list of accepted paired delimiters as of Unicode 14.0 is:

66
lib/warnings.pm generated
View File

@ -112,29 +112,28 @@ our %Offsets = (
'experimental::args_array_with_signatures'=> 136,
'experimental::builtin' => 138,
'experimental::defer' => 140,
'experimental::extra_paired_delimiters'=> 142,
'scalar' => 144,
'scalar' => 142,
# Warnings Categories added in Perl 5.035009
'deprecated::version_downgrade' => 146,
'deprecated::version_downgrade' => 144,
# Warnings Categories added in Perl 5.03501
'deprecated::delimiter_will_be_paired'=> 148,
'deprecated::delimiter_will_be_paired'=> 146,
# Warnings Categories added in Perl 5.037
'experimental::class' => 150,
'experimental::class' => 148,
# Warnings Categories added in Perl 5.037009
'deprecated::apostrophe_as_package_separator'=> 152,
'deprecated::apostrophe_as_package_separator'=> 150,
# Warnings Categories added in Perl 5.03701
'deprecated::smartmatch' => 154,
'deprecated::smartmatch' => 152,
# Warnings Categories added in Perl 5.039002
'deprecated::missing_import_called_with_args'=> 156,
'deprecated::missing_import_called_with_args'=> 154,
# Warnings Categories added in Perl 5.039008
'deprecated::subsequent_use_version'=> 158,
'deprecated::subsequent_use_version'=> 156,
);
our %Bits = (
@ -144,26 +143,25 @@ our %Bits = (
'closed' => "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
'closure' => "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
'debugging' => "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22]
'deprecated' => "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x10\x00\x00\x14\x55", # [2,48,49,62,73,74,76..79]
'deprecated::apostrophe_as_package_separator'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [76]
'deprecated::delimiter_will_be_paired'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [74]
'deprecated' => "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x10\x00\x00\x45\x15", # [2,48,49,62,72,73,75..78]
'deprecated::apostrophe_as_package_separator'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [75]
'deprecated::delimiter_will_be_paired'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [73]
'deprecated::dot_in_inc' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [62]
'deprecated::goto_construct' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", # [48]
'deprecated::missing_import_called_with_args'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [78]
'deprecated::smartmatch' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [77]
'deprecated::subsequent_use_version'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40", # [79]
'deprecated::missing_import_called_with_args'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [77]
'deprecated::smartmatch' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [76]
'deprecated::subsequent_use_version'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [78]
'deprecated::unicode_property_name' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00", # [49]
'deprecated::version_downgrade' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [73]
'deprecated::version_downgrade' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [72]
'digit' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [31]
'exec' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
'exiting' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x05\x04\x55\x55\x40\x00", # [53,54,56,57,61,64..71,75]
'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x05\x04\x55\x15\x10\x00", # [53,54,56,57,61,64..70,74]
'experimental::args_array_with_signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00", # [68]
'experimental::builtin' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [69]
'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [75]
'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [74]
'experimental::declared_refs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [61]
'experimental::defer' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [70]
'experimental::extra_paired_delimiters'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [71]
'experimental::private_use' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00", # [64]
'experimental::re_strict' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00", # [56]
'experimental::refaliasing' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00", # [57]
@ -201,7 +199,7 @@ our %Bits = (
'redundant' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", # [60]
'regexp' => "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20]
'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [37]
'scalar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [72]
'scalar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [71]
'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [38]
'severe' => "\x00\x00\x00\x00\x00\x54\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25]
'shadow' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [63]
@ -227,26 +225,25 @@ our %DeadBits = (
'closed' => "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
'closure' => "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
'debugging' => "\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22]
'deprecated' => "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x20\x00\x00\x28\xaa", # [2,48,49,62,73,74,76..79]
'deprecated::apostrophe_as_package_separator'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [76]
'deprecated::delimiter_will_be_paired'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [74]
'deprecated' => "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x20\x00\x00\x8a\x2a", # [2,48,49,62,72,73,75..78]
'deprecated::apostrophe_as_package_separator'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [75]
'deprecated::delimiter_will_be_paired'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [73]
'deprecated::dot_in_inc' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [62]
'deprecated::goto_construct' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00", # [48]
'deprecated::missing_import_called_with_args'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20", # [78]
'deprecated::smartmatch' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [77]
'deprecated::subsequent_use_version'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80", # [79]
'deprecated::missing_import_called_with_args'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [77]
'deprecated::smartmatch' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [76]
'deprecated::subsequent_use_version'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20", # [78]
'deprecated::unicode_property_name' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00", # [49]
'deprecated::version_downgrade' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [73]
'deprecated::version_downgrade' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [72]
'digit' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [31]
'exec' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
'exiting' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x0a\x08\xaa\xaa\x80\x00", # [53,54,56,57,61,64..71,75]
'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x0a\x08\xaa\x2a\x20\x00", # [53,54,56,57,61,64..70,74]
'experimental::args_array_with_signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00", # [68]
'experimental::builtin' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [69]
'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [75]
'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [74]
'experimental::declared_refs' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [61]
'experimental::defer' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [70]
'experimental::extra_paired_delimiters'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [71]
'experimental::private_use' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00", # [64]
'experimental::re_strict' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00", # [56]
'experimental::refaliasing' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00", # [57]
@ -284,7 +281,7 @@ our %DeadBits = (
'redundant' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00", # [60]
'regexp' => "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20]
'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [37]
'scalar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [72]
'scalar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [71]
'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [38]
'severe' => "\x00\x00\x00\x00\x00\xa8\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25]
'shadow' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [63]
@ -307,6 +304,7 @@ our %NoOp = (
'experimental::alpha_assertions' => 1,
'experimental::bitwise' => 1,
'experimental::const_attr' => 1,
'experimental::extra_paired_delimiters'=> 1,
'experimental::for_list' => 1,
'experimental::isa' => 1,
'experimental::lexical_subs' => 1,
@ -318,8 +316,8 @@ our %NoOp = (
# These are used by various things, including our own tests
our $NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
our $DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x05\x00\x15\x14\x55\x55\x54\x55"; # [2,4,22,23,25,48,49,56..58,61,62,64..71,73..79]
our $LAST_BIT = 160 ;
our $DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x05\x00\x15\x14\x55\x15\x55\x15"; # [2,4,22,23,25,48,49,56..58,61,62,64..70,72..78]
our $LAST_BIT = 158 ;
our $BYTES = 20 ;
sub Croaker
@ -954,8 +952,6 @@ The current hierarchy is:
| |
| +- experimental::defer
| |
| +- experimental::extra_paired_delimiters
| |
| +- experimental::private_use
| |
| +- experimental::re_strict

View File

@ -7731,15 +7731,6 @@ will no longer compile in a future version of Perl. Or you can turn on
S<C<use feature 'extra_paired_delimiters'>> and use the character that
is the mirror image of this one for the closing string delimiter.
=item Use of '%s' is experimental as a string delimiter
(S experimental::extra_paired_delimiters) This warning is emitted if
you use as a string delimiter one of the non-ASCII mirror image ones
enabled by S<C<use feature 'extra_paired_delimiters'>>. Simply suppress
the warning if you want to use the feature, but know that in doing so
you are taking the risk of using an experimental feature which may
change or be removed in a future Perl version:
=item Use of %s is not allowed in Unicode property wildcard
subpatterns in regex; marked by S<<-- HERE> in m/%s/

View File

@ -173,21 +173,6 @@ executed until the containing block is being exited.
The ticket for this experiment is
L<[perl #17949]|https://github.com/Perl/perl5/issues/17949>.
=item Extra paired delimiters for quote-like operators
Introduced in Perl 5.36.0
Using this feature triggers warnings in the category
C<experimental::extra_paired_delimiters>.
This feature allows for many non-ASCII pairs of mirroring delimiters, for
example:
my @array = qw« tinker tailor soldier spy »;
The ticket for this experiment is
L<[perl #19765]|https://github.com/Perl/perl5/issues/19765>.
=back
=head2 Accepted features
@ -365,6 +350,17 @@ Accepted in Perl 5.40.
This feature enables a parenthesized list of iteration variables for C<for>
rather than a single variable.
=item Extra paired delimiters for quote-like operators
Introduced in Perl 5.36.0
Accepted in Perl 5.40
This feature allows for many non-ASCII pairs of mirroring delimiters, for
example:
my @array = qw« tinker tailor soldier spy »;
=back
=head2 Removed features

View File

@ -934,12 +934,6 @@ This feature is available starting in Perl 5.36.
=head2 The 'extra_paired_delimiters' feature
B<WARNING>: This feature is still experimental and the implementation may
change or be removed in future versions of Perl. For this reason, Perl will
warn when you use the feature, unless you have explicitly disabled the warning:
no warnings "experimental::extra_paired_delimiters";
This feature enables the use of more paired string delimiters than the
traditional four, S<C<< < > >>>, S<C<( )>>, S<C<{ }>>, and S<C<[ ]>>. When
this feature is on, for example, you can say S<C<qrE<171>patE<187>>>.
@ -948,7 +942,16 @@ As with any usage of non-ASCII delimiters in a UTF-8-encoded source file, you
will want to ensure the parser will decode the source code from UTF-8 bytes
with a declaration such as C<use utf8>.
This feature is available starting in Perl 5.36.
This feature is available starting in Perl 5.36. From Perl 5.36 to 5.38,
it was classed as experimental, and Perl emitted a warning for its usage,
except when explicitly disabled:
no warnings "experimental::extra_paired_delimiters";
As of Perl 5.40, use of this feature no longer triggers a warning (though the
C<experimental::extra_paired_delimiters> warning category still exists for
compatibility with code that disables it). This feature is now considered
stable.
The complete list of accepted paired delimiters as of Unicode 14.0 is:

View File

@ -196,6 +196,7 @@ my %NO_BIT_FOR = map { ( uc $_ => 1, $_ => 1 ) } qw(
experimental::smartmatch
experimental::const_attr
experimental::for_list
experimental::extra_paired_delimiters
);
###########################################################################

View File

@ -11,8 +11,6 @@ BEGIN {
@INC= "../lib";
}
plan(tests => 53);
{
print <<''; # Yow!
ok 1
@ -313,10 +311,6 @@ local $SIG{__WARN__} = sub {
evalbytes <<EOS;
use feature 'extra_paired_delimiters';
my \$warns = q$lhs this string uses paired latin1 delimiters $rhs;
no warnings 'experimental::extra_paired_delimiters';
my \$nowarn = q$lhs this string uses paired latin1 delimiters $rhs;
no feature 'extra_paired_delimiters';
my \$warn2= q$lhs this string uses lhs delimiter fore/aft $lhs;
@ -324,21 +318,17 @@ my \$warn3= q$rhs this string uses rhs delimiter fore/aft $rhs;
EOS
is($@, "", "Various tests of string delims $lhs/$rhs returned without error");
is(@warnings, 3, "And the expected number of warnings were generated");
is(@warnings, 2, "And the expected number of warnings were generated");
like($warnings[0],
qr/Use of '$lhs' is experimental as a string delimiter at/,
'And the first warning is as expected');
like($warnings[1],
qr/Use of '$lhs' is deprecated as a string delimiter at/,
'And the second warning is as expected');
like($warnings[2],
like($warnings[1],
qr/Use of '$rhs' is deprecated as a string delimiter at/,
'And the third warning is as expected');
undef @warnings;
evalbytes <<EOS;
use feature 'extra_paired_delimiters';
no warnings 'experimental::extra_paired_delimiters';
my \$warn2= q$lhs this string uses lhs delimiter fore/aft $lhs;
EOS
@ -359,7 +349,6 @@ is(@warnings, 0, "With no warnings generated");
undef @warnings;
evalbytes <<EOS;
use feature 'extra_paired_delimiters';
no warnings 'experimental::extra_paired_delimiters';
my \$warn2= q$rhs this string reverses the delimiters $lhs;
EOS
@ -380,7 +369,6 @@ is(@warnings, 0, "With no warnings generated");
undef @warnings;
evalbytes <<EOS;
no warnings 'experimental::extra_paired_delimiters';
use feature 'extra_paired_delimiters';
my \$good= q$lhs this $lhs string has $lhs $lhs nested $rhs paired $rhs $rhs delimiters $rhs;
EOS
@ -390,7 +378,6 @@ is(@warnings, 0, "With no warnings generated");
undef @warnings;
evalbytes <<EOS;
no warnings 'experimental::extra_paired_delimiters';
use feature 'extra_paired_delimiters';
my \$good= q$lhs this $lhs string has $lhs too few closing $lhs nested $rhs paired rhs $rhs delimiters $rhs;
EOS
@ -398,3 +385,5 @@ EOS
like($@, qr/Can't find string terminator "$rhs" anywhere before EOF/,
"Using too few closing delims in nesting fails as expected");
is(@warnings, 0, "With no warnings generated");
done_testing();

10
toke.c
View File

@ -11797,16 +11797,6 @@ Perl_scan_str(pTHX_ char *start, int keep_bracketed_quoted, int keep_delims, int
close_delim_str = legal_paired_closing_delims
+ (tmps - legal_paired_opening_delims);
/* The list of paired delimiters contains all the ASCII ones that have
* always been legal, and no other ASCIIs. Don't raise a message if
* using one of these */
if (! isASCII(open_delim_code)) {
Perl_ck_warner_d(aTHX_
packWARN(WARN_EXPERIMENTAL__EXTRA_PAIRED_DELIMITERS),
"Use of '%" UTF8f "' is experimental as a string delimiter",
UTF8fARG(UTF, delim_byte_len, open_delim_str));
}
close_delim_code = (UTF)
? valid_utf8_to_uvchr((U8 *) close_delim_str, NULL)
: * (U8 *) close_delim_str;

18
warnings.h generated
View File

@ -135,36 +135,35 @@
#define WARN_EXPERIMENTAL__ARGS_ARRAY_WITH_SIGNATURES 68
#define WARN_EXPERIMENTAL__BUILTIN 69
#define WARN_EXPERIMENTAL__DEFER 70
#define WARN_EXPERIMENTAL__EXTRA_PAIRED_DELIMITERS 71
#define WARN_SCALAR 72
#define WARN_SCALAR 71
/* Warnings Categories added in Perl 5.035009 */
#define WARN_DEPRECATED__VERSION_DOWNGRADE 73
#define WARN_DEPRECATED__VERSION_DOWNGRADE 72
/* Warnings Categories added in Perl 5.03501 */
#define WARN_DEPRECATED__DELIMITER_WILL_BE_PAIRED 74
#define WARN_DEPRECATED__DELIMITER_WILL_BE_PAIRED 73
/* Warnings Categories added in Perl 5.037 */
#define WARN_EXPERIMENTAL__CLASS 75
#define WARN_EXPERIMENTAL__CLASS 74
/* Warnings Categories added in Perl 5.037009 */
#define WARN_DEPRECATED__APOSTROPHE_AS_PACKAGE_SEPARATOR 76
#define WARN_DEPRECATED__APOSTROPHE_AS_PACKAGE_SEPARATOR 75
/* Warnings Categories added in Perl 5.03701 */
#define WARN_DEPRECATED__SMARTMATCH 77
#define WARN_DEPRECATED__SMARTMATCH 76
/* Warnings Categories added in Perl 5.039002 */
#define WARN_DEPRECATED__MISSING_IMPORT_CALLED_WITH_ARGS 78
#define WARN_DEPRECATED__MISSING_IMPORT_CALLED_WITH_ARGS 77
/* Warnings Categories added in Perl 5.039008 */
#define WARN_DEPRECATED__SUBSEQUENT_USE_VERSION 79
#define WARN_DEPRECATED__SUBSEQUENT_USE_VERSION 78
#define WARNsize 20
#define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125"
#define WARN_NONEstring "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
@ -350,7 +349,6 @@ category parameters passed.
=for apidoc Amnh||WARN_EXPERIMENTAL__ARGS_ARRAY_WITH_SIGNATURES
=for apidoc Amnh||WARN_EXPERIMENTAL__BUILTIN
=for apidoc Amnh||WARN_EXPERIMENTAL__DEFER
=for apidoc Amnh||WARN_EXPERIMENTAL__EXTRA_PAIRED_DELIMITERS
=for apidoc Amnh||WARN_SCALAR
=for apidoc Amnh||WARN_DEPRECATED__VERSION_DOWNGRADE
=for apidoc Amnh||WARN_DEPRECATED__DELIMITER_WILL_BE_PAIRED