|
NAMESPOPS::Iterator::WrapList - SPOPS::Iterator wrapper around object listsSYNOPSISmy $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"; } DESCRIPTIONThis 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.METHODSinitialize()fetch_object() finish() SEE ALSOSPOPS::IteratorSPOPS::DBI COPYRIGHTCopyright (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. AUTHORSChris Winters <chris@cwinters.com>
Visit the GSP FreeBSD Man Page Interface. |