Skip to content

Commit

Permalink
Deprecate 'use UNIVERSAL'
Browse files Browse the repository at this point in the history
(cherry picked from commit e5f0b55)
  • Loading branch information
Julián Moreno Patiño authored and razvancrainea committed Feb 29, 2016
1 parent 7dadebb commit 8dce547
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions modules/perl/lib/perl/OpenSIPS/LDAPUtils/LDAPConnection.pm
Expand Up @@ -52,7 +52,6 @@ package OpenSIPS::LDAPUtils::LDAPConnection;
use OpenSIPS::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 ,"OpenSIPS::LDAPUtils::LDAPConnection") ) {
if( $conf->isa("OpenSIPS::LDAPUtils::LDAPConnection") ) {
$ldap = $conf;
} else {
if( ! $ldap_singleton ) {
Expand Down
7 changes: 3 additions & 4 deletions modules/perl/lib/perl/OpenSIPS/VDB.pm
Expand Up @@ -45,7 +45,6 @@ use OpenSIPS::VDB::Result;
use OpenSIPS::VDB::Value;
use OpenSIPS::VDB::VTab;

use UNIVERSAL qw ( can );

our @ISA = qw ( OpenSIPS::Utils::Debug );

Expand Down Expand Up @@ -87,12 +86,12 @@ sub use_table {

OpenSIPS::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 OpenSIPS::VDB::VTab( func => $pkg . "::" . $3);
} elsif (can($v, "init")) {
} elsif ($v->can("init")) {
$v->init();
$self->{vtabs}->{$v} = new OpenSIPS::VDB::VTab( obj => $v );
} elsif (can($v, "new")) {
} elsif ($v->can("new")) {
my $obj = $v->new();
$self->{vtabs}->{$v} = new OpenSIPS::VDB::VTab( obj => $obj );
} else {
Expand Down

0 comments on commit 8dce547

Please sign in to comment.