From: Chris R. <chr...@ma...> - 2003-01-15 17:21:42
|
On 15/1/03 4:51 pm, Graham Barr <gb...@po...> wrote: > On Wed, Jan 15, 2003 at 11:23:51AM -0500, Wilbur M. Sims III wrote: >> I've got attribute pulling down okay thanks to the great examples and >> perldoc. However I am having a hard time figuring out how to simply >> pullout everyone's DN. > >> $mesg->code && die $mesg->error; >> |---- foreach $entry ($mesg->all_entries) { >> ||---- foreach $attr ($entry->attributes) { > > $entry->dn; In addition if all you want are DNs then the search will be most efficient if you can stop the server returning any attributes in the search results as well. If you don't care what an attribute is, why get the server to send it to you? ;-) To do that, just add the following parameters to the search method: attrs => [ '1.1' ] That requires that you bind to the server using LDAPv3. Cheers, Chris |