Connector::Proxy::Net::LDAP::Single
Search and return a single item from the repository. Attributes from the ldap entry can be mapped to the returned structure using a map.
The connector will die if multiple entries are found.
See Connector::Proxy::Net::LDAP for basic configuration options
The class needs a map of attribute names to map between the returned hash and the names of the ldap attributes.
connector: LOCATION:... .... attrmap: certificate:usercertificate department:ou
Warning: Do not set the attr property
Not supported.
You need to define a map to assign the resulting ldap attributes to the returned hash structure. The maps keys remain keys whereas the value is set to the value of the ldap attribute with that name. Multivalued attributes are truncated to the first entry by default. To get them as array ref, set the deep parameter to true { deep = 1}>.
{ deep =
Note: the special name pkey is reserved and contains the dn of the entry.
Return the keys which are set in the resulting hash. Keys that do not have a matching attribute value are not set.
Set attributes of a node, if configured will create a non-exisiting node. The set method requires a hash as value parameter.
You can control how existing attributes in the node are treated and if missing nodes are created on the fly. See Connector::Proxy::Net::LDAP for details.
The connector first does a search similar to its get method based on the passed filter arguments. If exactly one entry is found, it works like the inverse of the get_hash method. It needs an attributemap and maps all values from the input hash to the ldap attributes. Only keys which are present in the input array are handled.
get
If you used another ldap operation before and already know the dn, you can pass this dn as parameter pkey to the set method.
$conn->set('John Doe', { mail => <new mail address>}, { pkey => $dn });
The dn is returned by example by the get_hash method.
get_hash
To enable the automated creation of missing nodes, look for the corresponding section in the base class Connector::Proxy::Net::LDAP.
To install Connector, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Connector
CPAN shell
perl -MCPAN -e shell install Connector
For more information on module installation, please visit the detailed CPAN module installation guide.