Net::LDAPxs::Search - Object returned by Net::LDAPxs search method


Net-LDAPxs documentation Contained in the Net-LDAPxs distribution.

Index


Code Index:

NAME

Top

Net::LDAPxs::Search - Object returned by Net::LDAPxs search method

SYNOPSIS

Top

  use Net::LDAPxs;

  $msg = $ldap->search( @search_args );

  @entries = $msg->entries;

DESCRIPTION

Top

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.

METHODS

Top

count

Returns the number of entries returned by the server.

entries

Return an array of Net::LDAPxs::Entry objects that were returned from the server.

pop_entry

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_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.

ACKNOWLEDGEMENTS

Top

This document is based on the document of Net::LDAP::Search

AUTHOR

Top

Pan Yu <xiaocong@vip.163.com>

COPYRIGHT AND LICENSE

Top


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__