Net::LDAP::Server provides the protocol handling for an LDAP server. You can subclass it and implement the methods you need (see below). Then you just instantiate your subclass and call its handle method to establish a connection with the client. WWW: https://metacpan.org/release/Net-LDAP-Server