simplify over-complex call of N:L:E->get_value()
@{ Net::LDAP::Entry->get_value(..., asref => 1) }
is equivalent to
Net::LDAP::Entry->get_value(...)
FossilOrigin-Name: 9d695e493d34c511d77e7c7a9226c3389725e86a41a10c7696f7521e853d293e
This commit is contained in:
parent
854df89671
commit
b712cd91db
1 changed files with 2 additions and 3 deletions
5
shelldap
5
shelldap
|
|
@ -408,8 +408,7 @@ sub init
|
||||||
$self->{'root_dse'} = $self->ldap->root_dse();
|
$self->{'root_dse'} = $self->ldap->root_dse();
|
||||||
if ( $conf->{'debug'} ) {
|
if ( $conf->{'debug'} ) {
|
||||||
$self->{'schema'} = $self->ldap->schema();
|
$self->{'schema'} = $self->ldap->schema();
|
||||||
my @versions =
|
my @versions = $self->{'root_dse'}->get_value('supportedLDAPVersion');
|
||||||
@{ $self->{'root_dse'}->get_value('supportedLDAPVersion', asref => 1) };
|
|
||||||
print "Connected to $conf->{'server'}\n";
|
print "Connected to $conf->{'server'}\n";
|
||||||
print "Supported LDAP version: ", ( join ', ', @versions ), "\n";
|
print "Supported LDAP version: ", ( join ', ', @versions ), "\n";
|
||||||
print "Cipher in use: ", $self->ldap()->cipher(), "\n";
|
print "Cipher in use: ", $self->ldap()->cipher(), "\n";
|
||||||
|
|
@ -1491,7 +1490,7 @@ sub run_list
|
||||||
else {
|
else {
|
||||||
|
|
||||||
# pull objectClasses, hash for lookup speed
|
# pull objectClasses, hash for lookup speed
|
||||||
my @oc = @{ $e->get_value( 'objectClass', asref => 1 ) || [] };
|
my @oc = $e->get_value('objectClass');
|
||||||
my %ochash;
|
my %ochash;
|
||||||
map { $ochash{$_} = 1 } @oc;
|
map { $ochash{$_} = 1 } @oc;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue