From 19b8c9fc5ef4c44c5fc96c19574482335fffb317 Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Tue, 30 Aug 2016 15:49:28 -0400 Subject: [PATCH] LP#1613326 change UNIVERSAL::can import, style Remove deprecated (and now fatal) attempt to import a function from UNIVERSAL. To quote perl5220delta: > use UNIVERSAL '...' is now a fatal error > > Importing functions from UNIVERSAL has been deprecated since > v5.12, and is now a fatal error. Also, adjust the style by which we call "can" on $self->{ils} Thanks to Blake at MOBIUS for originally reporting this issue, and proposing a fix. Signed-off-by: Jeff Godin --- SIPServer.pm | 2 +- Sip/MsgType.pm | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/SIPServer.pm b/SIPServer.pm index 5245ee3..0e36676 100755 --- a/SIPServer.pm +++ b/SIPServer.pm @@ -405,7 +405,7 @@ sub mux_input { if ($status) { # login OK - $self->{state} = $self->{ils}->state() if (UNIVERSAL::can($self->{ils},'state')); + $self->{state} = $self->{ils}->state() if ($self->{ils}->can('state')); $cache_data->{success} = 1; $cache_data->{net_server_parts} = { diff --git a/Sip/MsgType.pm b/Sip/MsgType.pm index 47df859..0cc4ae0 100644 --- a/Sip/MsgType.pm +++ b/Sip/MsgType.pm @@ -27,7 +27,6 @@ use strict; use warnings; use Exporter; use Sys::Syslog qw(syslog); -use UNIVERSAL qw(can); use Sip qw(:all); use Sip::Constants qw(:all); -- 2.11.0