From: Jeff Godin Date: Tue, 30 Aug 2016 19:49:28 +0000 (-0400) Subject: LP#1613326 change UNIVERSAL::can import, style X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=19b8c9fc5ef4c44c5fc96c19574482335fffb317;p=working%2FSIPServer.git 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 --- 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);