1 package Reaction::UI::WidgetClass::_OVER;
5 use namespace::clean -except => [ qw(meta) ];
8 has 'collection' => (is => 'ro', required => 1);
10 my ($self, $args) = @_;
11 my $coll = $args->{collection};
12 unless (ref $coll eq 'ARRAY' || (blessed($coll) && $coll->can('next'))) {
13 confess _OVER."->new collection arg ${coll} is neither"
14 ." arrayref nor implements next()";
19 my $coll = $self->collection;
20 if (ref $coll eq 'ARRAY') {
21 foreach my $el (@$coll) {
25 $coll->reset if $coll->can('reset');
26 while (my $el = $coll->next) {
31 __PACKAGE__->meta->make_immutable;