pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / development / perl-modules / Exception-Base-remove-smartmatch-when-5.38.0.patch
blob00fd4b7e0c692fbf094e8904eb5cdaef7d16d9c3
1 smartmatch deprecated in perl-5.37.10
3 Patch by @pghmcfc from
4 https://github.com/dex4er/perl-Exception-Base/issues/5#issuecomment-1637075218
6 diff --git a/t/tlib/Exception/BaseTest.pm b/t/tlib/Exception/BaseTest.pm
7 index d590d12..e531ed7 100644
8 --- a/t/tlib/Exception/BaseTest.pm
9 +++ b/t/tlib/Exception/BaseTest.pm
10 @@ -569,8 +569,9 @@ sub test_overload {
11 $self->assert_matches(qr/String at /, $obj);
13 # smart matching for Perl 5.10
14 - if ($] >= 5.010) {
15 + # Deprecation warning added in 5.37.10
16 + if ($] >= 5.010 && $] < 5.037010) {
17 no if $] >= 5.018, warnings => 'experimental::smartmatch';
18 eval q{
19 $self->assert_num_equals(1, 'String' ~~ $obj);