# phpman > perldoc > Net::LDAPI

## NAME
    [Net::LDAPI](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAPI/markdown) - use LDAP over a UNIX domain socket

## SYNOPSIS
     use [Net::LDAPI](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAPI/markdown);

     $ldapi = [Net::LDAPI](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAPI/markdown)->new('/var/run/ldapi');

     # alternate way
     use [Net::LDAP](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP/markdown);

     $ldapi = [Net::LDAP](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP/markdown)->new('ldapi://');

## DESCRIPTION
    Communicate using the LDAP protocol to a directory server using a UNIX domain socket. This
    mechanism is non-standard, UNIX-specific and not widely supported.

    All the normal "[Net::LDAP](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP/markdown)" methods can be used with a "[Net::LDAPI](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAPI/markdown)" object; see [Net::LDAP](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP/markdown) for
    details.

## CONSTRUCTOR
    new ( [SOCKPATH] )
        Create a new connection. SOCKPATH can optionally be specified, to specify the location of
        the UNIX domain socket to connect to.

        If SOCKPATH is not given, the environment variable "LDAPI_SOCK" is evaluated, and if that
        does not exist, the value "/var/run/ldapi" is used.

        See "new" in [Net::LDAP](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP/markdown) for further details.

## SEE ALSO
    [Net::LDAP](https://www.chedong.com/phpMan.php/perldoc/Net%3A%3ALDAP/markdown), [IO::Socket::UNIX](https://www.chedong.com/phpMan.php/perldoc/IO%3A%3ASocket%3A%3AUNIX/markdown)

## BUGS
    None yet.

## AUTHOR
    Derrik Pates <<dpates@dsdk12.net>>

## COPYRIGHT
    Copyright (c) 2003-2004, Derrik Pates and Graham Barr. All rights reserved. This library is free
    software; you can redistribute it and/or modify it under the same terms as Perl itself.

