http://www.perlmonks.org?node_id=71019

Item Description: A module to allow perl to query and/or update LDAP directories.

Review Synopsis:

Find it at: http://search.cpan.org/search?dist=perl-ldap

Description
Net::LDAP implements an OO interface to LDAP directories, allowing you to search, display and modify the information contained therein.

Who should use it?
Anyone who has to write perl that talks to an LDAP directory.

Good features: Has good default behaviour so you do not have to pass lots of specifics if you don't need to.
Will work asynchronously so that you can be doing work with the first results returned whilst the search is still being carried out

What are the drawbacks or problems?
There is no non-OO interface.
Must install Convert::ASN1.

Example code:
Code to dump the entire database (from the perspective of an anonomous bind.)

#!/usr/bin/perl -w use Net::LDAP; $ldap = Net::LDAP->new('127.0.0.1') or die "$@"; $ldap->bind ; # an anonymous bind $mesg = $ldap->search ( # perform a search base => "c=US", filter => "(objectclass=*)" ); $mesg->code && die $mesg->error; foreach $entry ($mesg->all_entries) { $entry->dump; } $ldap->unbind; # take down session

20050126 Janitored by Corion: s!Covert!Convert!, closed code tag