1Net::LDAP::Search(3)  User Contributed Perl Documentation Net::LDAP::Search(3)
2
3
4

NAME

6       Net::LDAP::Search - Object returned by Net::LDAP search method
7

SYNOPSIS

9        use Net::LDAP;
10
11        $mesg = $ldap->search( @search_args );
12
13        @entries = $mesg->entries;
14

DESCRIPTION

16       A Net::LDAP::Search object is returned from the search method of a
17       Net::LDAP object. It is a container object which holds the results of
18       the search.
19

METHODS

21       Net::LDAP::Search inherits from Net::LDAP::Message, and so supports all
22       methods defined in Net::LDAP::Message.
23
24       as_struct ( )
25           Returns a reference to a HASH, where the keys are the DNs of the
26           results and the values are HASH references. These second level
27           HASHes hold the attributes such that the keys are the attribute
28           names, in lowercase, and the values are references to an ARRAY
29           holding the values.
30
31           This method will block until the whole search request has finished.
32
33       count ( )
34           Returns the number of entries returned by the server.
35
36           This method will block until the whole search request has finished.
37
38       entry ( INDEX )
39           Return the N'th entry (zero-based), which will be a
40           Net::LDAP::Entry object.  If INDEX is greater or equal than the
41           total number of entries returned then "undef" will be returned.
42
43           This method will block until the search request has returned enough
44           entries.
45
46       entries ( )
47           Return an array of Net::LDAP::Entry objects that were returned from
48           the server.
49
50           This method will block until the whole search request has finished.
51
52       pop_entry ( )
53           Pop an entry from the internal list of Net::LDAP::Entry objects for
54           this search. If there are no more entries then "undef" is returned.
55
56           This call will block if the list is empty, until the server returns
57           another entry.
58
59       references ( )
60           Return a list of references that the server returned. This will be
61           a list of Net::LDAP::Reference objects.
62
63       sorted ( )
64           Return a list Net::LDAP::Entry objects, sorted by their DNs.
65
66           The sorting is done on the client side using Perl's alphanumerical
67           sort operator "cmp".
68
69       sorted ( ATTR, ... )
70           Return a list of Net::LDAP::Entry objects, sorted by the specified
71           attributes. The attributes are compared in the order specified,
72           each only being compared if all the prior attributes compare equal.
73
74           The sorting is done on the client side using Perl's alphanumerical
75           sort operator "cmp".
76
77       shift_entry ( )
78           Shift an entry from the internal list of Net::LDAP::Entry objects
79           for this search. If there are no more entries then "undef" is
80           returned.
81
82           This call will block if the list is empty, until the server returns
83           another entry.
84

SEE ALSO

86       Net::LDAP, Net::LDAP::Message, Net::LDAP::Entry, Net::LDAP::Reference
87

ACKNOWLEDGEMENTS

89       This document is based on a document originally written by Russell
90       Fulton <r.fulton@auckland.ac.nz>.
91

AUTHOR

93       Graham Barr <gbarr@pobox.com>
94
95       Please report any bugs, or post any suggestions, to the perl-ldap
96       mailing list <perl-ldap@perl.org>.
97
99       Copyright (c) 1997-2004 Graham Barr. All rights reserved. This program
100       is free software; you can redistribute it and/or modify it under the
101       same terms as Perl itself.
102
103
104
105perl v5.38.0                      2023-07-20              Net::LDAP::Search(3)
Impressum