Module: kamailio
Branch: 4.4
Commit: 3356d6aca4c85e7c086b1d46cf06e56635fd4739
URL:
https://github.com/kamailio/kamailio/commit/3356d6aca4c85e7c086b1d46cf06e56…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2016-04-15T09:26:23+02:00
app_perl: Fix "use UNIVERSAL" is a fatal error since perl 5.22
* Author: Julián Moreno Patiño <julian(a)debian.org>
* Fix #516
* from:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821039
(cherry picked from commit b77ed54d33f171d170ca89252f0a31a0d23996fa)
---
Modified: modules/app_perl/lib/perl/Kamailio/LDAPUtils/LDAPConnection.pm
Modified: modules/app_perl/lib/perl/Kamailio/VDB.pm
---
Diff:
https://github.com/kamailio/kamailio/commit/3356d6aca4c85e7c086b1d46cf06e56…
Patch:
https://github.com/kamailio/kamailio/commit/3356d6aca4c85e7c086b1d46cf06e56…
---
diff --git a/modules/app_perl/lib/perl/Kamailio/LDAPUtils/LDAPConnection.pm
b/modules/app_perl/lib/perl/Kamailio/LDAPUtils/LDAPConnection.pm
index f97a22d..3b6509a 100644
--- a/modules/app_perl/lib/perl/Kamailio/LDAPUtils/LDAPConnection.pm
+++ b/modules/app_perl/lib/perl/Kamailio/LDAPUtils/LDAPConnection.pm
@@ -52,7 +52,6 @@ package Kamailio::LDAPUtils::LDAPConnection;
use Kamailio::LDAPUtils::LDAPConf;
use Net::LDAP;
use Authen::SASL;
-use UNIVERSAL qw( isa );
my $ldap_singleton = undef;
@@ -185,7 +184,7 @@ sub search {
my $ldap = undef;
- if( isa($conf ,"Kamailio::LDAPUtils::LDAPConnection") ) {
+ if( $conf->isa("Kamailio::LDAPUtils::LDAPConnection") ) {
$ldap = $conf;
} else {
if( ! $ldap_singleton ) {
diff --git a/modules/app_perl/lib/perl/Kamailio/VDB.pm
b/modules/app_perl/lib/perl/Kamailio/VDB.pm
index 8c6bdb3..0fff716 100644
--- a/modules/app_perl/lib/perl/Kamailio/VDB.pm
+++ b/modules/app_perl/lib/perl/Kamailio/VDB.pm
@@ -45,7 +45,6 @@ use Kamailio::VDB::Result;
use Kamailio::VDB::Value;
use Kamailio::VDB::VTab;
-use UNIVERSAL qw ( can );
our @ISA = qw ( Kamailio::Utils::Debug );
@@ -87,12 +86,12 @@ sub use_table {
Kamailio::log(L_DBG, "perlvdb:VDB: Setting VTab: v is $v (pkg is $pkg, func/method
is $3)\n");
- if (can($pkg, $3)) {
+ if ($pkg->can($3)) {
$self->{vtabs}->{$v} = new Kamailio::VDB::VTab( func => $pkg . "::"
. $3);
- } elsif (can($v, "init")) {
+ } elsif ($v->can("init")) {
$v->init();
$self->{vtabs}->{$v} = new Kamailio::VDB::VTab( obj => $v );
- } elsif (can($v, "new")) {
+ } elsif ($v->can("new")) {
my $obj = $v->new();
$self->{vtabs}->{$v} = new Kamailio::VDB::VTab( obj => $obj );
} else {