Peter Karman > Net-LDAP-Class-0.26 > Net::LDAP::Class::SimpleIterator

Download:
Net-LDAP-Class-0.26.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.26   Source  

NAME ^

Net::LDAP::Class::SimpleIterator - iterate over Net::LDAP::Class objects

SYNOPSIS ^

 my $iterator = $user->groups_iterator;
 while ( my $group = $iterator->next ) {
    # $group isa Net::LDAP::Class::Group
 }
 printf("%d groups found\n", $iterator->count);

DESCRIPTION ^

Net::LDAP::Class::SimpleIterator uses a closure (CODE reference) to implement a simple next()-based API.

METHODS ^

init

Implements the standard object initialization.

code(sub_ref)

Required in new(). sub_ref is called on every invocation of next().

next

Calls code() and returns its value, incrementing count() if the value is defined.

count

Returns the number of iterations of next() that returned defined.

finish

Deletes the internal code reference.

is_exhausted

Tests for the existence of the internal code reference, returning true if the internal code reference no longer exists and false if it does.

AUTHOR ^

Peter Karman, <karman at cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-net-ldap-class at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-LDAP-Class. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Net::LDAP::Class

You can also look for information at:

COPYRIGHT ^

Copyright 2009 by Peter Karman.

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO ^

Net::LDAP, Net::LDAP::Batch

syntax highlighting: