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(...)
--- a/shelldap Sat Mar 05 17:33:41 2011 +0100
+++ b/shelldap Sat Mar 05 17:46:57 2011 +0100
@@ -408,8 +408,7 @@
$self->{'root_dse'} = $self->ldap->root_dse();
if ( $conf->{'debug'} ) {
$self->{'schema'} = $self->ldap->schema();
- my @versions =
- @{ $self->{'root_dse'}->get_value('supportedLDAPVersion', asref => 1) };
+ my @versions = $self->{'root_dse'}->get_value('supportedLDAPVersion');
print "Connected to $conf->{'server'}\n";
print "Supported LDAP version: ", ( join ', ', @versions ), "\n";
print "Cipher in use: ", $self->ldap()->cipher(), "\n";
@@ -1491,7 +1490,7 @@
else {
# pull objectClasses, hash for lookup speed
- my @oc = @{ $e->get_value( 'objectClass', asref => 1 ) || [] };
+ my @oc = $e->get_value('objectClass');
my %ochash;
map { $ochash{$_} = 1 } @oc;