Skip to content

Commit 3c5517e

Browse files
committed
Silence deprecation warning when testing smartmatch
The smartmatch operator (along with `given` and `when`) is being deprecated in Perl 5.38. When the `experimental::smartmatch` does not exists anymore, that means a deprecation warning will be produced instead. Silence it.
1 parent 6e4c61b commit 3c5517e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpan/Test-Simple/t/Legacy/Regression/870-experimental-warnings.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ require Test::More;
88
*cmp_ok = \&Test::More::cmp_ok;
99

1010
no warnings "experimental::smartmatch";
11+
no if !exists $warnings::Offsets{"experimental::smartmatch"}, warnings => 'deprecated';
1112

1213
my $warnings = warnings { cmp_ok(1, "~~", 1) };
1314

0 commit comments

Comments
 (0)