Net::LDAP::Search(3)
hiii bestie!! welcome to Net::LDAP::Search(3), straight out of the User Contributed Perl Documentation collection β¨ This is the container object that the search method of a Net::LDAP object hands back to you, and it's holding all your search results like a very organized group chat π«Ά
πΈ NAME πΈ
Net::LDAP::Search β the object returned by the Net::LDAP search method, no cap.
β¨ SYNOPSIS β¨
use Net::LDAP;
$mesg = $ldap->search( @search_args );
@entries = $mesg->entries;
π¦ DESCRIPTION π¦
A Net::LDAP::Search object comes back from the search method of a Net::LDAP object. It's a container object, and it holds the results of the search. Basically it's the tote bag for your LDAP search results π
π METHODS π
Net::LDAP::Search inherits from Net::LDAP::Message, so it supports all methods defined in Net::LDAP::Message β yes bestie, all of them π
π as_struct ( ) π
Returns a reference to a HASH. The keys are the DNs of the results, and the values are HASH references. Those second level HASHes hold the attributes: keys are the attribute names, in lowercase, and values are references to an ARRAY holding the values.
Heads up: this method will block until the whole search request has finished β³
π count ( ) π
Returns the number of entries returned by the server.
This method will block until the whole search request has finished β³
π§ entry ( INDEX ) π§
Returns the N'th entry, zero-based, and that entry will be a Net::LDAP::Entry object. If INDEX is greater or equal than the total number of entries returned, then undef will be returned. No index, no entry, iykyk π
This method will block until the search request has returned enough entries β³
π entries ( ) π
Returns an array of Net::LDAP::Entry objects that were returned from the server.
This method will block until the whole search request has finished β³
π¦ pop_entry ( ) π¦
Pops an entry from the internal list of Net::LDAP::Entry objects for this search. If there are no more entries, then undef is returned.
This call will block if the list is empty, until the server returns another entry β³
π references ( ) π
Returns a list of references that the server returned. This will be a list of Net::LDAP::Reference objects.
β sorted ( ) β
Returns a list of Net::LDAP::Entry objects, sorted by their DNs.
The sorting is done on the client side using Perl's alphanumerical sort operator cmp.
πΈ sorted ( ATTR, ... ) πΈ
Returns a list of Net::LDAP::Entry objects, sorted by the specified attributes. The attributes are compared in the order specified, and each one is only compared if all the prior attributes compare equal.
The sorting is done on the client side using Perl's alphanumerical sort operator cmp.
π shift_entry ( ) π
Shifts an entry from the internal list of Net::LDAP::Entry objects for this search. If there are no more entries, then undef is returned.
This call will block if the list is empty, until the server returns another entry β³
π₯ SEE ALSO π₯
Net::LDAPNet::LDAP::MessageNet::LDAP::EntryNet::LDAP::Reference
π ACKNOWLEDGEMENTS π
This document is based on a document originally written by Russell Fulton <r.fulton@auckland.ac.nz>.
π AUTHOR π
Graham Barr <gbarr@pobox.com>.
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>.
π«Ά COPYRIGHT π«Ά
Copyright (c) 1997-2004 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.
kisses bestie π this is the Net::LDAP::Search(3) page from perl v5.42.0, dated 2024-01-02 β now go slay those searches β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-ldap 0.68-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms