From: Graham B. <gb...@po...> - 2000-11-06 11:41:08
|
----- Forwarded message from Stephen King <Ste...@ut...> ----- From: "Stephen King" <Ste...@ut...> To: gb...@po... Date: Fri, 3 Nov 2000 11:18:43 +1100 Subject: perl-ldap question X-Mailer: DMailWeb Web to Mail Gateway 2.6k, http://netwinsite.com/top_mail.htm Dear Graham, I have a question about the perl-ldap module. I have written a script that searches the ldap database. There seems to be a strange set of results being returned. If the results returned are a small subset of the database (eg: 150) it works fine. A larger set of results (eg: 256) seems to 'hang' until another connection/query to the database is made and then results from the script are returned. Is this something that you have come across before? It's got me a little perplexed! Here is a segment of the code $ldap = Net::LDAP->new($server, port => $port, async => 1) || die("Couldn't connect to LDAP server"); my @Attrs = ('uid'); my $result = LDAPsearch($ldap,"(gid=xxx)",\@Attrs,$base); my @entries = $result->entries; $ldap->unbind if ($ldap); ...... sub LDAPsearch { my ($ldap,$searchString,$attrs,$base) = @_ ; my $result = $ldap->search ( base => "$base", scope => "sub", filter => "$searchString", attrs => $attrs ); } Any help or hints would be great. Cheers, Steve King http://netwinsite.com ----- End forwarded message ----- |