Skip to content

Commit

Permalink
app_perl: Fix "use UNIVERSAL" is a fatal error since perl 5.22
Browse files Browse the repository at this point in the history
* Author: Julián Moreno Patiño <julian@debian.org>
* Fix #516
* from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821039
  • Loading branch information
linuxmaniac committed Apr 15, 2016
1 parent daf7aa3 commit b77ed54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Expand Up @@ -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;

Expand Down Expand Up @@ -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 ) {
Expand Down
7 changes: 3 additions & 4 deletions modules/app_perl/lib/perl/Kamailio/VDB.pm
Expand Up @@ -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 );

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit b77ed54

Please sign in to comment.