mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
Revert "Remove experimental warnings from extra paired delimiters"
This properly returns the extra paired delimiters feature to experimental status. This reverts commit a09a0269dd243971b28401d82f5214932d0d6c8f.
This commit is contained in:
parent
9028e12473
commit
c729e47cb9
17
lib/feature.pm
generated
17
lib/feature.pm
generated
@ -477,6 +477,12 @@ 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>>>.
|
||||
@ -485,16 +491,7 @@ 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. 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.
|
||||
This feature is available starting in Perl 5.36.
|
||||
|
||||
For a full list of the available characters, see
|
||||
L<perlop/List of Extra Paired Delimiters>.
|
||||
|
||||
68
lib/warnings.pm
generated
68
lib/warnings.pm
generated
@ -5,7 +5,7 @@
|
||||
|
||||
package warnings;
|
||||
|
||||
our $VERSION = "1.69";
|
||||
our $VERSION = "1.70";
|
||||
|
||||
# Verify that we're called correctly so that warnings will work.
|
||||
# Can't use Carp, since Carp uses us!
|
||||
@ -112,28 +112,29 @@ our %Offsets = (
|
||||
'experimental::args_array_with_signatures'=> 136,
|
||||
'experimental::builtin' => 138,
|
||||
'experimental::defer' => 140,
|
||||
'scalar' => 142,
|
||||
'experimental::extra_paired_delimiters'=> 142,
|
||||
'scalar' => 144,
|
||||
|
||||
# Warnings Categories added in Perl 5.035009
|
||||
'deprecated::version_downgrade' => 144,
|
||||
'deprecated::version_downgrade' => 146,
|
||||
|
||||
# Warnings Categories added in Perl 5.03501
|
||||
'deprecated::delimiter_will_be_paired'=> 146,
|
||||
'deprecated::delimiter_will_be_paired'=> 148,
|
||||
|
||||
# Warnings Categories added in Perl 5.037
|
||||
'experimental::class' => 148,
|
||||
'experimental::class' => 150,
|
||||
|
||||
# Warnings Categories added in Perl 5.037009
|
||||
'deprecated::apostrophe_as_package_separator'=> 150,
|
||||
'deprecated::apostrophe_as_package_separator'=> 152,
|
||||
|
||||
# Warnings Categories added in Perl 5.03701
|
||||
'deprecated::smartmatch' => 152,
|
||||
'deprecated::smartmatch' => 154,
|
||||
|
||||
# Warnings Categories added in Perl 5.039002
|
||||
'deprecated::missing_import_called_with_args'=> 154,
|
||||
'deprecated::missing_import_called_with_args'=> 156,
|
||||
|
||||
# Warnings Categories added in Perl 5.039008
|
||||
'deprecated::subsequent_use_version'=> 156,
|
||||
'deprecated::subsequent_use_version'=> 158,
|
||||
);
|
||||
|
||||
our %Bits = (
|
||||
@ -143,25 +144,26 @@ 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\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' => "\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::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\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::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::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\x01\x00", # [72]
|
||||
'deprecated::version_downgrade' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [73]
|
||||
'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\x15\x10\x00", # [53,54,56,57,61,64..70,74]
|
||||
'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::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\x10\x00", # [74]
|
||||
'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [75]
|
||||
'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]
|
||||
@ -199,7 +201,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\x40\x00\x00", # [71]
|
||||
'scalar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [72]
|
||||
'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]
|
||||
@ -225,25 +227,26 @@ 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\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' => "\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::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\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::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::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\x02\x00", # [72]
|
||||
'deprecated::version_downgrade' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [73]
|
||||
'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\x2a\x20\x00", # [53,54,56,57,61,64..70,74]
|
||||
'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::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\x20\x00", # [74]
|
||||
'experimental::class' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [75]
|
||||
'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]
|
||||
@ -281,7 +284,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\x80\x00\x00", # [71]
|
||||
'scalar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [72]
|
||||
'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]
|
||||
@ -304,7 +307,6 @@ 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,
|
||||
@ -316,8 +318,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\x15\x55\x15"; # [2,4,22,23,25,48,49,56..58,61,62,64..70,72..78]
|
||||
our $LAST_BIT = 158 ;
|
||||
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 $BYTES = 20 ;
|
||||
|
||||
sub Croaker
|
||||
@ -952,6 +954,8 @@ The current hierarchy is:
|
||||
| |
|
||||
| +- experimental::defer
|
||||
| |
|
||||
| +- experimental::extra_paired_delimiters
|
||||
| |
|
||||
| +- experimental::private_use
|
||||
| |
|
||||
| +- experimental::re_strict
|
||||
|
||||
@ -7756,6 +7756,15 @@ 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/
|
||||
|
||||
|
||||
@ -174,18 +174,20 @@ 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 The C<class> feature
|
||||
=item Extra paired delimiters for quote-like operators
|
||||
|
||||
Introduced in Perl 5.38.0
|
||||
|
||||
This feature provides new syntax and semantics for using object oriented
|
||||
programming based on classes. For more information see L<perlclass>.
|
||||
Introduced in Perl 5.36.0
|
||||
|
||||
Using this feature triggers warnings in the category
|
||||
C<experimental::class>.
|
||||
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 #22139]|https://github.com/Perl/perl5/issues/22139>.
|
||||
L<[perl #19765]|https://github.com/Perl/perl5/issues/19765>.
|
||||
|
||||
=back
|
||||
|
||||
@ -364,17 +366,6 @@ 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
|
||||
|
||||
@ -937,6 +937,12 @@ 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>>>.
|
||||
@ -945,16 +951,7 @@ 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. 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.
|
||||
This feature is available starting in Perl 5.36.
|
||||
|
||||
For a full list of the available characters, see
|
||||
L<perlop/List of Extra Paired Delimiters>.
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
#
|
||||
# This script is normally invoked from regen.pl.
|
||||
|
||||
$VERSION = '1.69';
|
||||
$VERSION = '1.70';
|
||||
|
||||
BEGIN {
|
||||
require './regen/regen_lib.pl';
|
||||
@ -196,7 +196,6 @@ my %NO_BIT_FOR = map { ( uc $_ => 1, $_ => 1 ) } qw(
|
||||
experimental::smartmatch
|
||||
experimental::const_attr
|
||||
experimental::for_list
|
||||
experimental::extra_paired_delimiters
|
||||
);
|
||||
|
||||
###########################################################################
|
||||
|
||||
19
t/op/lex.t
19
t/op/lex.t
@ -11,6 +11,8 @@ BEGIN {
|
||||
@INC= "../lib";
|
||||
}
|
||||
|
||||
plan(tests => 53);
|
||||
|
||||
{
|
||||
print <<''; # Yow!
|
||||
ok 1
|
||||
@ -311,6 +313,10 @@ 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;
|
||||
@ -318,17 +324,21 @@ 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, 2, "And the expected number of warnings were generated");
|
||||
is(@warnings, 3, "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[1],
|
||||
like($warnings[2],
|
||||
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
|
||||
|
||||
@ -349,6 +359,7 @@ 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
|
||||
|
||||
@ -369,6 +380,7 @@ 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
|
||||
@ -378,6 +390,7 @@ 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
|
||||
@ -385,5 +398,3 @@ 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
10
toke.c
@ -11796,6 +11796,16 @@ 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
18
warnings.h
generated
@ -135,35 +135,36 @@
|
||||
#define WARN_EXPERIMENTAL__ARGS_ARRAY_WITH_SIGNATURES 68
|
||||
#define WARN_EXPERIMENTAL__BUILTIN 69
|
||||
#define WARN_EXPERIMENTAL__DEFER 70
|
||||
#define WARN_SCALAR 71
|
||||
#define WARN_EXPERIMENTAL__EXTRA_PAIRED_DELIMITERS 71
|
||||
#define WARN_SCALAR 72
|
||||
|
||||
/* Warnings Categories added in Perl 5.035009 */
|
||||
|
||||
#define WARN_DEPRECATED__VERSION_DOWNGRADE 72
|
||||
#define WARN_DEPRECATED__VERSION_DOWNGRADE 73
|
||||
|
||||
/* Warnings Categories added in Perl 5.03501 */
|
||||
|
||||
#define WARN_DEPRECATED__DELIMITER_WILL_BE_PAIRED 73
|
||||
#define WARN_DEPRECATED__DELIMITER_WILL_BE_PAIRED 74
|
||||
|
||||
/* Warnings Categories added in Perl 5.037 */
|
||||
|
||||
#define WARN_EXPERIMENTAL__CLASS 74
|
||||
#define WARN_EXPERIMENTAL__CLASS 75
|
||||
|
||||
/* Warnings Categories added in Perl 5.037009 */
|
||||
|
||||
#define WARN_DEPRECATED__APOSTROPHE_AS_PACKAGE_SEPARATOR 75
|
||||
#define WARN_DEPRECATED__APOSTROPHE_AS_PACKAGE_SEPARATOR 76
|
||||
|
||||
/* Warnings Categories added in Perl 5.03701 */
|
||||
|
||||
#define WARN_DEPRECATED__SMARTMATCH 76
|
||||
#define WARN_DEPRECATED__SMARTMATCH 77
|
||||
|
||||
/* Warnings Categories added in Perl 5.039002 */
|
||||
|
||||
#define WARN_DEPRECATED__MISSING_IMPORT_CALLED_WITH_ARGS 77
|
||||
#define WARN_DEPRECATED__MISSING_IMPORT_CALLED_WITH_ARGS 78
|
||||
|
||||
/* Warnings Categories added in Perl 5.039008 */
|
||||
|
||||
#define WARN_DEPRECATED__SUBSEQUENT_USE_VERSION 78
|
||||
#define WARN_DEPRECATED__SUBSEQUENT_USE_VERSION 79
|
||||
#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"
|
||||
@ -349,6 +350,7 @@ 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user