From 157bd0a33a7b8191e671b32554eb0018b57f314c Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Mon, 7 Feb 2022 17:26:13 +0000 Subject: [PATCH] No longer print experimental::isa warning (closes #18754) --- lib/B/Deparse-core.t | 3 +-- lib/feature.pm | 16 +++++++++------- pod/perldelta.pod | 7 +++++++ pod/perldiag.pod | 6 ------ pod/perlexperiment.pod | 16 ++++++---------- pod/perlop.pod | 5 ++--- regen/feature.pl | 16 +++++++++------- t/op/cmpchain.t | 2 +- t/op/isa.t | 1 - toke.c | 2 -- 10 files changed, 35 insertions(+), 39 deletions(-) diff --git a/lib/B/Deparse-core.t b/lib/B/Deparse-core.t index 6dbb178..48d23f7 100644 --- a/lib/B/Deparse-core.t +++ b/lib/B/Deparse-core.t @@ -81,7 +81,7 @@ sub testit { my $code_ref; if ($lexsub) { package lexsubtest; - no warnings 'experimental::lexical_subs', 'experimental::isa'; + no warnings 'experimental::lexical_subs'; use feature 'lexical_subs'; no strict 'vars'; $code = "sub { state sub $keyword; ${vars}() = $expr }"; @@ -91,7 +91,6 @@ sub testit { } else { package test; - no warnings 'experimental::isa'; use subs (); import subs $keyword; $code = "no strict 'vars'; sub { ${vars}() = $expr }"; diff --git a/lib/feature.pm b/lib/feature.pm index d1091aa..12503c6 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -361,17 +361,19 @@ This feature is available from Perl 5.26 onwards. =head2 The 'isa' feature -B: 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::isa"; - This allows the use of the C infix operator, which tests whether the scalar given by the left operand is an object of the class given by the right operand. See L for more details. -This feature is available from Perl 5.32 onwards. +This feature is available from Perl 5.32 onwards. From Perl 5.32 to 5.34, +it was classed as experimental, and Perl emitted a warning for its usage, +except when explicitly disabled: + + no warnings "experimental::isa"; + +As of Perl 5.36, use of this feature no longer triggers a warning (though the +C warning category stilll exists for compatibility with +code that disables it). =head2 The 'indirect' feature diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 8fe4c72..39261f9 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -55,6 +55,13 @@ Z<> The behaviour of code which attempts to do this is no longer specified, and may be subject to change in a future version. +=head2 The C operator is no longer experimental + +Introduced in Perl version 5.32.0, this operator has remained unchanged +since then. The operator is now considered a stable languauge feature. + +For more detail see L. + =head1 Security XXX Any security-related notices go here. In particular, any security diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 2c089e9..79bd55a 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -3304,12 +3304,6 @@ unaware of. (F) An attempt was made to C the L pragma module to create a lexical alias for an unknown function name. -=item isa is experimental - -(S experimental::isa) This warning is emitted if you use the (C) -operator. This operator is currently experimental and its behaviour may -change in future releases of Perl. - =item -i used with no filenames on the command line, reading from STDIN (S inplace) The C<-i> option was passed on the command line, indicating diff --git a/pod/perlexperiment.pod b/pod/perlexperiment.pod index b6481c3..0df60fb 100644 --- a/pod/perlexperiment.pod +++ b/pod/perlexperiment.pod @@ -153,16 +153,6 @@ C. The ticket for this experiment is L<[perl #18759]|https://github.com/Perl/perl5/issues/18759>. -=item isa infix operator - -Introduced in Perl 5.32.0. - -Using this feature triggers warnings in the category -C. - -The ticket for this experiment is -L<[perl #18754]|https://github.com/Perl/perl5/issues/18754> - =item try/catch control structure Introduced in Perl 5.34.0. @@ -306,6 +296,12 @@ Introduced in Perl 5.28.0 Accepted in Perl 5.32.0 +=item The infix C operator + +Introduced in Perl 5.32.0 + +Accepted in Perl 5.36.0 + =back =head2 Removed features diff --git a/pod/perlop.pod b/pod/perlop.pod index 29fceb3..8c820ed 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -673,9 +673,8 @@ scalar expression that yields a string class name: if( $obj isa "Different::Class" ) { ... } if( $obj isa $name_of_class ) { ... } -This is an experimental feature and is available from Perl 5.31.6 when enabled -by C. It emits a warning in the C -category. +This feature is available from Perl 5.31.6 onwards when enabled by +C. =head2 Smartmatch Operator diff --git a/regen/feature.pl b/regen/feature.pl index 18e2cee..afad62a 100755 --- a/regen/feature.pl +++ b/regen/feature.pl @@ -772,17 +772,19 @@ This feature is available from Perl 5.26 onwards. =head2 The 'isa' feature -B: 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::isa"; - This allows the use of the C infix operator, which tests whether the scalar given by the left operand is an object of the class given by the right operand. See L for more details. -This feature is available from Perl 5.32 onwards. +This feature is available from Perl 5.32 onwards. From Perl 5.32 to 5.34, +it was classed as experimental, and Perl emitted a warning for its usage, +except when explicitly disabled: + + no warnings "experimental::isa"; + +As of Perl 5.36, use of this feature no longer triggers a warning (though the +C warning category stilll exists for compatibility with +code that disables it). =head2 The 'indirect' feature diff --git a/t/op/cmpchain.t b/t/op/cmpchain.t index 236d5f9..48aaabf 100644 --- a/t/op/cmpchain.t +++ b/t/op/cmpchain.t @@ -7,7 +7,7 @@ BEGIN { } use feature "isa"; -no warnings qw(experimental::smartmatch experimental::isa); +no warnings qw(experimental::smartmatch); my @cheqop = qw(== != eq ne); my @nceqop = qw(<=> cmp ~~); diff --git a/t/op/isa.t b/t/op/isa.t index 461b0c4..42a993a 100644 --- a/t/op/isa.t +++ b/t/op/isa.t @@ -9,7 +9,6 @@ BEGIN { use strict; use feature 'isa'; -no warnings 'experimental::isa'; plan 14; diff --git a/toke.c b/toke.c index d8007bd..ffb7320 100644 --- a/toke.c +++ b/toke.c @@ -8132,8 +8132,6 @@ yyl_word_or_keyword(pTHX_ char *s, STRLEN len, I32 key, I32 orig_keyword, struct LOP(OP_IOCTL,XTERM); case KEY_isa: - Perl_ck_warner_d(aTHX_ - packWARN(WARN_EXPERIMENTAL__ISA), "isa is experimental"); NCRop(OP_ISA); case KEY_join: -- 1.8.3.1