simplify over-complex call of N:L:E->get_value()
authorPeter Marschall <peter@adpm.de>
Sat, 05 Mar 2011 17:46:57 +0100
changeset 17 669085d93aa3
parent 16 a2e3faa3d2fc
child 18 db47ba64ebda
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(...)
shelldap
--- 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;