Mozilla::LDAP::Conn is an Object Oriented API for the LDAP SDK.
This package is the main API for using our Perl Object Oriented LDAP module. Even though it's certainly possible, and sometimes even necessary, to call the native LDAP C SDK functions, we strongly recommend you use these object classes.
It's not required to use our Mozilla::LDAP::Utils.pm package, but it's convenient and good for portability if you use as much as you can from that package as well. This implies using the LdapConf package as well, even though you usually don't need to use it directly.
You should read this document in combination with the Mozilla::LDAP::Entry document. Both modules depend on each other heavily.
First, this is not ment to be a crash course in how LDAP works, if you have no experience with LDAP, I suggest you read some of the literature that's available out there. The LDAP Deployment Book from Netscape, or the LDAP C SDK documentation are good starting points.
This object class basically tracks and manages the LDAP connection, it's current status, and the current search operation (if any). Every time you call the search method of an object instance, you'll reset it's internal state. It depends heavily on the ::Entry class, which are used to retrieve, modify and update a single entry.
The search and nextEntry methods returns Mozilla::LDAP::Entry objects, naturally. You also have to instantiate (and modify) a new ::Entry object when you want to add new entries to an LDAP server. Alternatively, the add() method will also take a hash array as argument, to make it easy to create new LDAP entries.
To assure that changes to an entry are updated properly, we strongly recommend you use the native methods of the ::Entry object class. Even though you can modify certain elements directly, it could cause changes not to be committed to the LDAP server. If there's something missing from the API, please let us know, or even fix it yourself.