From 8a487d3f1ae60a2317e9a756cc95a7e691e1dbd3 Mon Sep 17 00:00:00 2001 From: "Philippe Bruhat (BooK)" Date: Mon, 24 Oct 2022 01:22:59 +0200 Subject: Replace 'experimental::smartmatch' by 'deprecated' in tests --- lib/B/Deparse.t | 10 +++++----- lib/overload.t | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t index c7a3307a9a..ae1372f630 100644 --- a/lib/B/Deparse.t +++ b/lib/B/Deparse.t @@ -1061,7 +1061,7 @@ my $c = []; my $d = \[]; #### # SKIP ?$] < 5.010 && "smartmatch and given/when not implemented on this Perl version" -# CONTEXT use feature ':5.10'; no warnings 'experimental::smartmatch'; +# CONTEXT use feature ':5.10'; no warnings 'deprecated'; # implicit smartmatch in given/when given ('foo') { when ('bar') { continue; } @@ -1624,7 +1624,7 @@ my @a; $a[0] = 1; #### # feature features without feature -# CONTEXT no warnings 'experimental::smartmatch'; +# CONTEXT no warnings 'deprecated'; CORE::state $x; CORE::say $x; CORE::given ($x) { @@ -1640,7 +1640,7 @@ CORE::evalbytes ''; () = CORE::fc $x; #### # feature features when feature has been disabled by use VERSION -# CONTEXT no warnings 'experimental::smartmatch'; +# CONTEXT no warnings 'deprecated'; use feature (sprintf(":%vd", $^V)); use 1; CORE::say $_; @@ -1670,7 +1670,7 @@ CORE::evalbytes ''; () = CORE::__SUB__; #### # (the above test with CONTEXT, and the output is equivalent but different) -# CONTEXT use feature ':5.10'; no warnings 'experimental::smartmatch'; +# CONTEXT use feature ':5.10'; no warnings 'deprecated'; # feature features when feature has been disabled by use VERSION use feature (sprintf(":%vd", $^V)); use 1; @@ -1704,7 +1704,7 @@ CORE::evalbytes ''; #### # SKIP ?$] < 5.017004 && "lexical subs not implemented on this Perl version" # lexical subroutines and keywords of the same name -# CONTEXT use feature 'lexical_subs', 'switch'; no warnings 'experimental'; +# CONTEXT use feature 'lexical_subs', 'switch'; no warnings 'experimental'; no warnings 'deprecated'; my sub default; my sub else; my sub elsif; diff --git a/lib/overload.t b/lib/overload.t index 3a2b50ed92..adb57d3ee2 100644 --- a/lib/overload.t +++ b/lib/overload.t @@ -1910,7 +1910,7 @@ foreach my $op (qw(<=> == != < <= > >=)) { for my $sub (keys %subs) { - no warnings 'experimental::smartmatch'; + no warnings 'deprecated'; my $term = $subs{$sub}; my $t = sprintf $term, '$_[0][0]'; my $e ="sub { \$funcs .= '($sub)'; my \$r; if (\$use_int) {" @@ -1952,7 +1952,7 @@ foreach my $op (qw(<=> == != < <= > >=)) { ? "-\$_[0][0]" : "$_[3](\$_[0][0])"; my $r; - no warnings 'experimental::smartmatch'; + no warnings 'deprecated'; if ($use_int) { use integer; $r = eval $e; } @@ -1999,7 +1999,7 @@ foreach my $op (qw(<=> == != < <= > >=)) { $use_int = ($int ne ''); my $plain = $tainted_val; my $plain_term = $int . sprintf $sub_term, '$plain'; - my $exp = do {no warnings 'experimental::smartmatch'; eval $plain_term }; + my $exp = do {no warnings 'deprecated'; eval $plain_term }; diag("eval of plain_term <$plain_term> gave <$@>") if $@; SKIP: { is_if_taint_supported(tainted($exp), $exp_taint, @@ -2029,7 +2029,7 @@ foreach my $op (qw(<=> == != < <= > >=)) { my $res_term = $int . sprintf $sub_term, $var; my $desc = "<$res_term> $ov_pkg" ; - my $res = do { no warnings 'experimental::smartmatch'; eval $res_term }; + my $res = do { no warnings 'deprecated'; eval $res_term }; diag("eval of res_term $desc gave <$@>") if $@; # uniquely, the inc/dec ops return the original # ref rather than a copy, so stringify it to -- cgit v1.2.1