URI::URL::ldap - LDAP Uniform Resource Locators
use URI::URL::ldap; $url = URI::URL::ldap->new($url_string); $dn = $url->dn; $filter = $url->filter; @attr = $url->attributes; $scope = $url->scope; %extn = $url->extensions; $url = URI::URL::ldap->new; $url->host("ldap.itd.umich.edu"); $url->dn("o=University of Michigan,c=US"); $url->attributes(qw(postalAddress)); $url->scope('sub'); $url->filter('(cn=Babs Jensen)'); print $url->as_string,"\n";
URI::URL::ldap provides an interface to parse an LDAP URL in its constituent parts and also build a URL as described in RFC-2255
URI::URL::ldap
URI::URL::ldap support all methods defined by URI::URL, plus the following.
Each of the methods can be used to set or get the value in the URL. If arguments are given then a new value will be set for the given part of the URL.
Set or get the DN part of the URL
Set or get the list of attribute names which will be returned by the search.
Set or get the scope that the search will use. The value can be one of base, one or sub. If none is given the it will default to base
base
one
sub
Set or get the filter that the search will use.
Set or get the extensions used for the search. The list passed should be in the form type1, value1, type2, value2 ... This is also the form of list that will be returned.
RFC-2255
Graham Barr <gbarr@pobox.com>
Copyright (c) 1998 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::LDAP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::LDAP
CPAN shell
perl -MCPAN -e shell install Net::LDAP
For more information on module installation, please visit the detailed CPAN module installation guide.