perlPackages.ExceptionBase: add patch for perl 5.38.0

This commit is contained in:
Stig Palmquist 2023-08-01 16:49:18 +02:00
parent d01224781f
commit 5a9c09f2f7
No known key found for this signature in database
GPG Key ID: C02CE66D684EC1FE
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,20 @@
smartmatch deprecated in perl-5.37.10
Patch by @pghmcfc from
https://github.com/dex4er/perl-Exception-Base/issues/5#issuecomment-1637075218
diff --git a/t/tlib/Exception/BaseTest.pm b/t/tlib/Exception/BaseTest.pm
index d590d12..e531ed7 100644
--- a/t/tlib/Exception/BaseTest.pm
+++ b/t/tlib/Exception/BaseTest.pm
@@ -569,8 +569,9 @@ sub test_overload {
$self->assert_matches(qr/String at /, $obj);
# smart matching for Perl 5.10
- if ($] >= 5.010) {
+ # Deprecation warning added in 5.37.10
+ if ($] >= 5.010 && $] < 5.037010) {
no if $] >= 5.018, warnings => 'experimental::smartmatch';
eval q{
$self->assert_num_equals(1, 'String' ~~ $obj);

View File

@ -8668,6 +8668,9 @@ with self; {
hash = "sha256-VyPdePSsC00mKgXqRq9mPqANgJay6cCkNRXCEHYOHnU=";
};
buildInputs = [ TestUnitLite ];
patches = [
../development/perl-modules/Exception-Base-remove-smartmatch-when-5.38.0.patch
];
meta = {
description = "Lightweight exceptions";
license = with lib.licenses; [ artistic1 gpl1Plus ];