SPOPS::Iterator::WrapList - SPOPS::Iterator wrapper around object lists
my $list = My::SPOPS->fetch_group({ skip_security => 1, where => 'package = ?', value => [ 'base_theme' ], order => 'name' }); my $iter = SPOPS::Iterator->from_list( $list ); while ( $iter->has_next ) { my $template = $iter->get_next; print "Item ", $iter->position, ": $template->{package} / $template->{name}"; print " (", $iter->is_first, ") (", $iter->is_last, ")\n"; }
This is an implementation of the SPOPS::Iterator interface so that we can use a common interface no matter whether an SPOPS implementation supports iterators or not. You can also ensure that display or other classes can be coded to only one interface since it is so simple to wrap a list in an iterator.
initialize()
fetch_object()
finish()
SPOPS::Iterator
SPOPS::DBI
Copyright (c) 2001-2004 intes.net, inc.. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Chris Winters <chris@cwinters.com>
To install SPOPS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPOPS
CPAN shell
perl -MCPAN -e shell install SPOPS
For more information on module installation, please visit the detailed CPAN module installation guide.