SPOPS::Iterator::WrapList - SPOPS::Iterator wrapper around object lists


SPOPS documentation  | view source Contained in the SPOPS distribution.

Index


NAME

Top

SPOPS::Iterator::WrapList - SPOPS::Iterator wrapper around object lists

SYNOPSIS

Top

  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

Top

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

Top

initialize()

fetch_object()

finish()

SEE ALSO

Top

SPOPS::Iterator

SPOPS::DBI

COPYRIGHT

Top

AUTHORS

Top

Chris Winters <chris@cwinters.com>


SPOPS documentation  | view source Contained in the SPOPS distribution.