| Net-LDAPxs documentation | Contained in the Net-LDAPxs distribution. |
Net::LDAPxs::Search - Object returned by Net::LDAPxs search method
use Net::LDAPxs; $msg = $ldap->search( @search_args ); @entries = $msg->entries;
A Net::LDAPxs::Search object is returned from the search method of a Net::LDAPxs object. It is a container object which holds the results of the search.
Returns the number of entries returned by the server.
Return an array of Net::LDAPxs::Entry objects that were returned from the server.
Pop an entry from the internal list of Net::LDAPxs::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.
Shift an entry from the internal list of Net::LDAPxs::Entry objects for this search.
This call will block if the list is empty, until the server returns another entry.
This document is based on the document of Net::LDAP::Search
Pan Yu <xiaocong@vip.163.com>
Copyright (C) 2008-2009 by Pan Yu. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Net-LDAPxs documentation | Contained in the Net-LDAPxs distribution. |
package Net::LDAPxs::Search; use 5.006; use strict; use vars qw($VERSION); use Net::LDAPxs::Entry; $VERSION = '1.00'; sub count { $#{shift->{entries}}+1; } sub entries { my $self = shift; ($self->count > 0) ? @{$self->{entries}} : undef; } sub shift_entry { my $self = shift; ($self->count > 0) ? shift @{$self->{entries}} : undef; } sub pop_entry { my $self = shift; ($self->count > 0) ? pop @{$self->{entries}} : undef; } sub all_entries { goto &entries } sub err { # This method is to avoid misusing the same function in Exception.pm. } 1; __END__