From a7f6d8238ea42bbf30a41126f608d814d03e530d Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Thu, 19 Nov 2015 12:15:34 +0000 Subject: [PATCH] Bug 15215: Remove warning due to misuse of UNIVERSAL MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Calling UNIVERSAL's internal methods will cause a depreciation warning in perls less that 5.22 as of 5.22 the warning is a fatal error causing compilation to abort Replace the use UNIVERSAL with UNIVERSAL::can to work around the buggy construct perldoc UNIVERSAL::can for more info Signed-off-by: Bernardo Gonzalez Kriegel No more worning/error No qa errors Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit d69b6c048077fc028941870d1912b325076800c1) Signed-off-by: Frédéric Demians --- C4/Installer/PerlDependencies.pm | 5 +++++ C4/SIP/Sip/MsgType.pm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm index 9a77a40f71..ada7ffa313 100644 --- a/C4/Installer/PerlDependencies.pm +++ b/C4/Installer/PerlDependencies.pm @@ -732,6 +732,11 @@ our $PERL_DEPS = { 'required' => '0', 'min_ver' => '0.31', }, + 'UNIVERSAL::can' => { + 'usage' => 'SIP', + 'required' => '1', + 'min_ver' => '1.10', + }, }; 1; diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm index 5d8906673c..5875319ff9 100644 --- a/C4/SIP/Sip/MsgType.pm +++ b/C4/SIP/Sip/MsgType.pm @@ -19,7 +19,7 @@ use Data::Dumper; use CGI qw ( -utf8 ); use C4::Auth qw(&check_api_auth); -use UNIVERSAL qw(can); # make sure this is *after* C4 modules. +use UNIVERSAL::can; use vars qw(@ISA $VERSION @EXPORT_OK); -- 2.39.5