http://qs1969.pair.com?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

Replies are listed 'Best First'.
Re: NET::LDAP
by greenFox (Vicar) on Apr 18, 2001 at 14:41 UTC

    I thought it was worth noting here that Net::LDAP has its own homepage at sourceforge, Perl-LDAP Homepage where you can find the documentation, FAQ , an excellent set of examples , and a very helpful mailing list.

    Updated: 2002-08-29 fixed some broken links...

    --
    my $chainsaw = 'Perl';

Re: NET::LDAP
by lachoy (Parson) on Apr 18, 2001 at 15:38 UTC
Re: NET::LDAP
by lachoy (Parson) on Aug 05, 2002 at 15:27 UTC

    Something to consider: SPOPS (specifically: SPOPS::LDAP) has an OO interface to LDAP datastores, including the ability to refer to objects in multiple directories through a single interface.

    Chris
    M-x auto-bs-mode