From 90c00dd78e90be1451671cd6cef6a83785b71b7b Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Thu, 20 Nov 2014 14:28:08 +1000 Subject: [PATCH] + LDV::LDAP : POD --- lib/LDV/LDAP.pm | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/lib/LDV/LDAP.pm b/lib/LDV/LDAP.pm index c60fbaf..b40807a 100644 --- a/lib/LDV/LDAP.pm +++ b/lib/LDV/LDAP.pm @@ -117,3 +117,50 @@ sub update { } 1; + +=pod + +=head1 NAME + +LDV::LDAP -- ldap routines + +=head1 METHODS + +=head2 C + + my $ldap = LDV::LDAP->new(\%opts); + +* server -- server to connect to (ip-address, default: localhost) +* binddn -- auth as this DB (like cn=admin,dc=example,dc=com, default: unset) +* bindpass -- auth with this password (string, default: unset) +* userbase -- where to search for users, (like dc=example,dc=com, default: unset) +* userfilter -- objects that pass the filter, considered as users (default : "(class=InetOrgPerson)" + +=head2 C + + my $ldap = LDV::LDAP->new(\%opts); + my $err = $ldap->create($username); + +Returns nothing on success or scalar with text of error. + +=head2 C + + my $ldap = LDV::LDAP->new(\%opts); + my $err = $ldap->delete($username); + +Returns nothing on success or scalar with text of error. + +=head2 C + + my $ldap = LDV::LDAP->new(\%opts); + my $attrs = $ldap->get($username); + +Get user attributes. Returns HASH on success or undef if not found. + +=head2 C + + my $ldap = LDV::LDAP->new(\%opts); + +TODO + +=cut