From 6c5b256838f5720bed5bd6303ccefaf78e556b83 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 22 Jul 2023 22:39:42 +0200 Subject: [PATCH] provide empty import on Mouse::Deprecated for imported Moose test One of the translated tests imported from Moose includes a line use Mouse::Deprecated -api_version => '1.07'; Our tests set up a fake Mouse::Deprecated package to ignore this. But newer versions of perl will no longer ignore the arguments passed to the undefined import method, and instead will throw an error. Add an empty import method to entirely ignore these arguments. --- t/lib/MooseCompat.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/lib/MooseCompat.pm b/t/lib/MooseCompat.pm index 2a8b19fc..b98f81b3 100644 --- a/t/lib/MooseCompat.pm +++ b/t/lib/MooseCompat.pm @@ -17,6 +17,8 @@ $INC{'Mouse/Deprecated.pm'} = __FILE__; $thing->isa($role); } unless UNIVERSAL->can('DOES'); +# ignore arguments in imported Moose test +sub Mouse::Deprecated::import {} $Mouse::Deprecated::deprecated = $Mouse::Deprecated::deprecated = undef; # -w package Mouse::Util;