Class::DBI::Lite::Iterator - Simple iterator for Class::DBI::Lite
# Get an iterator somehow: my $iter = app::artist->retrieve_all; my $artist = $iter->first; my $record_count = $iter->count; while( my $artist = $iter->next ) { ... }# end while() # We can reset the iterator to go back to the beginning: $iter->reset; print $_->id . "\n" while $_ = $iter->next;
Provides a simple iterator-based approach to Class::DBI::Lite resultsets.
Returns the number of records in the Iterator.
Returns the next object in the series, or undef.
Moves the internal cursor to the next object if one exists.
Resets the internal cursor to the first object if one exists.
Class::DBI:Lite
John Drago <jdrago_999@yahoo.com>.
Copyright 2008 John Drago <jdrago_999@yahoo.com>. All rights reserved.
This software is Free software and may be used and distributed under the same terms as perl itself.
To install Class::DBI::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::DBI::Lite
CPAN shell
perl -MCPAN -e shell install Class::DBI::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.