Net::LDAPapi is a Perl5 Module Supporting LDAP API.
This module allows Perl programmers to access and manipulate an LDAP based Directory.
Versions beginning with 1.40 support both the original "C API" and new "Perl OO" style interface methods. With version 1.42, I've added named arguments.
THE INTIAL CONNECTION
All connections to the LDAP server are started by creating a new "blessed object" in the Net::LDAPapi class. This can be done quite easily by the following type of statement.
$ld = new Net::LDAPapi($hostname);
Where $hostname is the name of your LDAP server. If you are not using the standard LDAP port (389), you will also need to supply the portnumber.
$ld = new Net::LDAPapi($hostname, 15555);
The new method can also be called with named arguments.
$ld = new Net::LDAPapi(-host=>$hostname, -port=>15389);
Instead of the above mentioned argumens -url can be used in the following form
$ld = new Net::LDAPapi(-url=>"ldap://host:port");
Setting -debug=>"TRUE" will enable more verbose error messages.
Note that with named arguments, the order of the arguments is insignificant.