Control: tag -1 patch On Thu, Aug 10, 2023 at 09:20:42PM +0300, Niko Tyni wrote: > Source: libmethod-signatures-perl > Version: 20170211-3 > Severity: important > Tags: ftbfs trixie sid > User: debian-p...@lists.debian.org > Usertags: perl-5.38-transition > > This package fails to build from source with Perl 5.38 (currently in > experimental.) > > > http://perl.debian.net/rebuild-logs/perl-5.38-throwaway/libmethod-signatures-perl_20170211-3/libmethod-signatures-perl_20170211-3_amd64-2023-08-04T06:11:02Z.build > > # Failed test 'no warnings for using smartmatch' > # at t/where.t line 21. > # found warning: Smartmatch is deprecated at (eval 34) line 1. > # didn't expect to find a warning
Here's a patch for this issue. -- Niko Tyni nt...@debian.org
>From 958378982f9a046708cdd69b1c5e1189700f5273 Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Sun, 20 Aug 2023 20:19:59 +0100 Subject: [PATCH] Skip smartmatch warnings test for newer perls Bug-Debian: http://bugs.debian.org/1043425 --- t/where.t | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/t/where.t b/t/where.t index 09f027d..511860c 100644 --- a/t/where.t +++ b/t/where.t @@ -18,8 +18,10 @@ use Method::Signatures; my $where_func = q{ func silly_test ($x where { $_ == 3 }) {} }; -warning_is { eval $where_func } undef, 'no warnings for using smartmatch'; - +SKIP: { + skip "Smartmatch should warn for Perl >= 5.37.10", 1 if $] >= 5.037010; + warning_is { eval $where_func } undef, 'no warnings for using smartmatch'; +} subtest 'where { block() }' => sub { plan tests => 3; @@ -152,15 +154,15 @@ subtest 'where with placeholders' => sub { ok eval { constrained_placeholder(2) }, 'constrained_placeholder() called as expected' or note $@; - # line 155 + # line 157 throws_ok { constrained_placeholder() } - required_placeholder_error('main', 0, 'constrained_placeholder', LINE => 156), + required_placeholder_error('main', 0, 'constrained_placeholder', LINE => 158), 'missing requierd constrained placeholder'; throws_ok { constrained_placeholder('foo') } - placeholder_badval_error('main', 0, 'Int' => 'foo', 'constrained_placeholder', LINE => 159), + placeholder_badval_error('main', 0, 'Int' => 'foo', 'constrained_placeholder', LINE => 161), 'placeholder value wrong type'; throws_ok { constrained_placeholder(99) } - placeholder_failed_constraint_error('main', 0, 99 => '{$_<10}', 'constrained_placeholder', LINE => 162), + placeholder_failed_constraint_error('main', 0, 99 => '{$_<10}', 'constrained_placeholder', LINE => 164), 'placeholder value wrong type'; }; -- 2.39.1