Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options


by bobtfish (Scribe)
on Apr 09, 2001 at 19:14 UTC ( #71019=modulereview: print w/replies, xml ) Need Help??

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

Review Synopsis:

Find it at:

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('') 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'.
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';

by lachoy (Parson) on Apr 18, 2001 at 15:38 UTC
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.

    M-x auto-bs-mode

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: modulereview [id://71019]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2019-04-19 07:05 GMT
Find Nodes?
    Voting Booth?
    I am most likely to install a new module from CPAN if:

    Results (106 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!