\section{NAME\label{NAME-Search}} Net::LDAP::Search - Object returned by Net::LDAP search method \section{SYNOPSIS\label{SYNOPSIS-Search}\index{synopsis of Net::LDAP::Search}} \begin{verbatim} use Net::LDAP; \end{verbatim} \begin{verbatim} $mesg = $ldap->search( @search_args ); \end{verbatim} \begin{verbatim} @entries = $mesg->entries; \end{verbatim} \section{DESCRIPTION\label{DESCRIPTION-Search}\index{description of Net::LDAP::Search}} A \textbf{Net::LDAP::Search} object is returned from the \textsf{search} method of a \emph{Net::LDAP} object. It is a container object which holds the results of the search. \section{METHODS\label{METHODS-Search}\index{methods of Net::LDAP::Search}} \textbf{Net::LDAP::Search} inherits from \emph{Net::LDAP::Message}, and so supports all methods defined in \emph{Net::LDAP::Message}. \begin{description} \item[as\_struct ()] \mbox{} Returns a reference to a HASH, where the keys are the DNs of the results and the values are HASH references. These second level HASHes hold the attributes such that the keys are the attribute names, in lowercase, and the values are references to an ARRAY holding the values. This method will block until the whole search request has finished. \item[count ()] \index{count() --- Net::LDAP::Search method}\mbox{} Returns the number of entries returned by the server. This method will block until the whole search request has finished. \item[entry ( INDEX )] \index{entry() --- Net::LDAP::Search method}\mbox{} Return the N'th entry, which will be a \emph{Net::LDAP::Entry} object. If INDEX is greater than the total number of entries returned then \texttt{undef} will be returned. This method will block until the search request has returned enough entries. \item[entries ()] \index{entries() --- Net::LDAP::Search method}\mbox{} Return an array of \emph{Net::LDAP::Entry} objects that were returned from the server. This method will block until the whole search request has finished. \item[pop\_entry ()] \index{pop\_entry() --- Net::LDAP::Search method}\mbox{} Pop an entry from the internal list of \emph{Net::LDAP::Entry} objects for this search. If there are no more entries then \texttt{undef} is returned. This call will block if the list is empty, until the server returns another entry. \item[references ()] \mbox{} Return a list of references that the server returned. This will be a list of \emph{Net::LDAP::Reference} objects. \item[sorted ()] \mbox{} Return a list \textsf{Net::LDAP:Entry} objects, sorted by their DNs. \item[sorted ( ATTR, ... )] \mbox{} Return a list of \emph{Net::LDAP::Entry} objects, sorted by the specified attributes. The attributes are compared in the order specified, each only being compared if all the prior attributes compare equal. \item[shift\_entry ()]\index{shift\_entry() --- Net::LDAP::Search method} \mbox{} Shift an entry from the internal list of \emph{Net::LDAP::Entry} objects for this search. If there are no more entries then \texttt{undef} is returned. This call will block if the list is empty, until the server returns another entry. \end{description} \section{SEE ALSO\label{SEE_ALSO-Search}\index{see also for Net::LDAP::Search}} \emph{Net::LDAP}, \emph{Net::LDAP::Message}, \emph{Net::LDAP::Entry}, \emph{Net::LDAP::Reference} \section{ACKNOWLEDGEMENTS}\label{ACKNOWLEDGEMENTS-Search} This document is based on a document originally written by Russell Fulton $<$r.fulton@auckland.ac.nz$>$. \section{AUTHOR}\label{AUTHOR-Search} Graham Barr $<$gbarr@pobox.com$>$ Please report any bugs, or post any suggestions, to the perl-ldap mailing list $<$perl-ldap@perl.org$>$. \section{COPYRIGHT}\label{COPYRIGHT-Search} Copyright (c) 1997-2000 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. \textit{\$Id: Search.pod,v 1.7 2003/08/02 18:50:18 chrisridd Exp \$}