Returns the name corresponding with ERR. ERR can either be an LDAP error number, or a Net::LDAP::Message object containing an error code. If the error is not known the a string in the form "LDAP error code %d(0x%02X)" is returned.

Returns the text from the POD description for the given error. ERR can either be an LDAP error code, or a Net::LDAP::Message object containing an LDAP error code. If the error code given is unknown then undef is returned.

Returns the given DN in a canonical form. Returns undef if DN is not a valid Distinguished Name. (Note: The empty string "" is a valid DN.) DN can either be a string or reference to an array of hashes as returned by ldap_explode_dn, which is useful when constructing a DN.

It performs the following operations on the given DN:

Removes the leading 'OID.' characters if the type is an OID instead of a name.

Escapes all RFC 4514 special characters (",", "+", """, "\", "<", ">", ";", "#", "=", " "), slashes ("/"), and any other character where the ASCII code is < 32 as \hexpair.

Converts all leading and trailing spaces in values to be \20.

If an RDN contains multiple parts, the parts are re-ordered so that the attribute type names are in alphabetical order.

Explodes the given DN into an array of hashes and returns a reference to this array. Returns undef if DN is not a valid Distinguished Name.

A Distinguished Name is a sequence of Relative Distinguished Names (RDNs), which themselves are sets of Attributes. For each RDN a hash is constructed with the attribute type names as keys and the attribute values as corresponding values. These hashes are then stored in an array in the order in which they appear in the DN.

Escapes the given VALUES according to RFC 4515 so that they can be safely used in LDAP filters.

Any control characters with an ASCII code < 32 as well as the characters with special meaning in LDAP filters "*", "(", ")", and "\" the backslash are converted into the representation of a backslash followed by two hex digits representing the hexadecimal value of the character.

Returns the converted list in list mode and the first element in scalar mode.

Escapes the given VALUES according to RFC 4514 so that they can be safely used in LDAP DNs.

The characters ",", "+", """, "\", "<", ">", ";", "#", "=" with a special meaning in section 2.4 of RFC 4514 are preceded by a backslash. Control characters with an ASCII code < 32 are represented as \hexpair. Finally all leading and trailing spaces are converted to sequences of \20.

Returns the converted list in list mode and the first element in scalar mode.

This leaves all keys in the resulting hash undefined where the corresponding URL element is empty.

To distinguish between an empty base DN and an undefined base DN, ldap_url_parse uses the slash between the host:port resp. path part of the URL and the base DN part of the URL. With the slash present, the hash key base is set to the empty string, without it, it is left undefined.

Leaving away the defaults option entirely is equivalent to setting it to TRUE.

Returns the hash in list mode, or the reference to the hash in scalar mode.

Convert the generalizedTime string GENERALIZEDTIME, which is expected to match the template YYYYmmddHH[MM[SS]][(./,)d...](Z|(+/-)HH[MM]) to a floating point number compatible with UNIX time (i.e. the integral part of the number is a UNIX time).

Returns an extended UNIX time or undef on error.

Times in years smaller than 1000 will lead to undef being returned. This restriction is a direct effect of the year value interpretation rules in Time::Local.