|
|
d183182 |
From: =?UTF-8?q?Juli=C3=A1n=20Moreno=20Pati=C3=B1o?= <julian@debian.org>
|
|
|
d183182 |
Date: Sat, 27 Feb 2016 01:15:12 +0300
|
|
|
d183182 |
Subject: [PATCH] Fix "use UNIVERSAL" is a fatal error since perl 5.22
|
|
|
d183182 |
following http://search.cpan.org/~shay/perl-5.22.1/lib/UNIVERSAL.pm
|
|
|
d183182 |
documentation Bug: https://github.com/OpenSIPS/opensips/issues/804
|
|
|
d183182 |
|
|
|
d183182 |
|
|
|
d183182 |
diff --git a/modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm b/modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm
|
|
|
d183182 |
index 9275341..d0d1bb2 100644
|
|
|
d183182 |
--- a/modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm
|
|
|
d183182 |
+++ b/modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm
|
|
|
d183182 |
@@ -52,7 +52,6 @@ package OpenSIPS::LDAPUtils::LDAPConnection;
|
|
|
d183182 |
use OpenSIPS::LDAPUtils::LDAPConf;
|
|
|
d183182 |
use Net::LDAP;
|
|
|
d183182 |
use Authen::SASL;
|
|
|
d183182 |
-use UNIVERSAL qw( isa );
|
|
|
d183182 |
|
|
|
d183182 |
my $ldap_singleton = undef;
|
|
|
d183182 |
|
|
|
d183182 |
@@ -185,7 +184,7 @@ sub search {
|
|
|
d183182 |
|
|
|
d183182 |
my $ldap = undef;
|
|
|
d183182 |
|
|
|
d183182 |
- if( isa($conf ,"OpenSIPS::LDAPUtils::LDAPConnection") ) {
|
|
|
d183182 |
+ if( $conf->isa("OpenSIPS::LDAPUtils::LDAPConnection") ) {
|
|
|
d183182 |
$ldap = $conf;
|
|
|
d183182 |
} else {
|
|
|
d183182 |
if( ! $ldap_singleton ) {
|
|
|
d183182 |
diff --git a/modules/perl/lib/perl/OpenSIPS/VDB.pm b/modules/perl/lib/perl/OpenSIPS/VDB.pm
|
|
|
d183182 |
index 7b7d4dd..0668552 100644
|
|
|
d183182 |
--- a/modules/perl/lib/perl/OpenSIPS/VDB.pm
|
|
|
d183182 |
+++ b/modules/perl/lib/perl/OpenSIPS/VDB.pm
|
|
|
d183182 |
@@ -45,7 +45,6 @@ use OpenSIPS::VDB::Result;
|
|
|
d183182 |
use OpenSIPS::VDB::Value;
|
|
|
d183182 |
use OpenSIPS::VDB::VTab;
|
|
|
d183182 |
|
|
|
d183182 |
-use UNIVERSAL qw ( can );
|
|
|
d183182 |
|
|
|
d183182 |
our @ISA = qw ( OpenSIPS::Utils::Debug );
|
|
|
d183182 |
|
|
|
d183182 |
@@ -87,12 +86,12 @@ sub use_table {
|
|
|
d183182 |
|
|
|
d183182 |
OpenSIPS::log(L_DBG, "perlvdb:VDB: Setting VTab: v is $v (pkg is $pkg, func/method is $3)\n");
|
|
|
d183182 |
|
|
|
d183182 |
- if (can($pkg, $3)) {
|
|
|
d183182 |
+ if ($pkg->can($3)) {
|
|
|
d183182 |
$self->{vtabs}->{$v} = new OpenSIPS::VDB::VTab( func => $pkg . "::" . $3);
|
|
|
d183182 |
- } elsif (can($v, "init")) {
|
|
|
d183182 |
+ } elsif ($v->can("init")) {
|
|
|
d183182 |
$v->init();
|
|
|
d183182 |
$self->{vtabs}->{$v} = new OpenSIPS::VDB::VTab( obj => $v );
|
|
|
d183182 |
- } elsif (can($v, "new")) {
|
|
|
d183182 |
+ } elsif ($v->can("new")) {
|
|
|
d183182 |
my $obj = $v->new();
|
|
|
d183182 |
$self->{vtabs}->{$v} = new OpenSIPS::VDB::VTab( obj => $obj );
|
|
|
d183182 |
} else {
|