1URI::ldap(3)          User Contributed Perl Documentation         URI::ldap(3)
2
3
4

NAME

6       URI::ldap - LDAP Uniform Resource Locators
7

SYNOPSIS

9         use URI;
10
11         $uri = URI->new("ldap:$uri_string");
12         $dn     = $uri->dn;
13         $filter = $uri->filter;
14         @attr   = $uri->attributes;
15         $scope  = $uri->scope;
16         %extn   = $uri->extensions;
17
18         $uri = URI->new("ldap:");  # start empty
19         $uri->host("ldap.itd.umich.edu");
20         $uri->dn("o=University of Michigan,c=US");
21         $uri->attributes(qw(postalAddress));
22         $uri->scope('sub');
23         $uri->filter('(cn=Babs Jensen)');
24         print $uri->as_string,"\n";
25

DESCRIPTION

27       "URI::ldap" provides an interface to parse an LDAP URI into its
28       constituent parts and also to build a URI as described in RFC 2255.
29

METHODS

31       "URI::ldap" supports all the generic and server methods defined by URI,
32       plus the following.
33
34       Each of the following methods can be used to set or get the value in
35       the URI. The values are passed in unescaped form.  None of these return
36       undefined values, but elements without a default can be empty.  If
37       arguments are given, then a new value is set for the given part of the
38       URI.
39
40       $uri->dn( [$new_dn] )
41           Sets or gets the Distinguished Name part of the URI.  The DN
42           identifies the base object of the LDAP search.
43
44       $uri->attributes( [@new_attrs] )
45           Sets or gets the list of attribute names which are returned by the
46           search.
47
48       $uri->scope( [$new_scope] )
49           Sets or gets the scope to be used by the search. The value can be
50           one of "base", "one" or "sub". If none is given in the URI then the
51           return value defaults to "base".
52
53       $uri->_scope( [$new_scope] )
54           Same as scope(), but does not default to anything.
55
56       $uri->filter( [$new_filter] )
57           Sets or gets the filter to be used by the search. If none is given
58           in the URI then the return value defaults to "(objectClass=*)".
59
60       $uri->_filter( [$new_filter] )
61           Same as filter(), but does not default to anything.
62
63       $uri->extensions( [$etype => $evalue,...] )
64           Sets or gets the extensions used for the search. The list passed
65           should be in the form etype1 => evalue1, etype2 => evalue2,... This
66           is also the form of list that is returned.
67

SEE ALSO

69       <http://tools.ietf.org/html/rfc2255>
70

AUTHOR

72       Graham Barr <gbarr@pobox.com>
73
74       Slightly modified by Gisle Aas to fit into the URI distribution.
75
77       Copyright (c) 1998 Graham Barr. All rights reserved. This program is
78       free software; you can redistribute it and/or modify it under the same
79       terms as Perl itself.
80
81
82
83perl v5.34.0                      2021-10-26                      URI::ldap(3)
Impressum