NAME
SPOPS::Iterator::WrapList - SPOPS::Iterator wrapper around object lists
SYNOPSIS
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";
}
DESCRIPTION
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.
METHODS
initialize()
fetch_object()
finish()
SEE ALSO
COPYRIGHT
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.
AUTHORS
Chris Winters <chris@cwinters.com>