1 package Reaction::UI::WidgetClass::_OVER;
7 has 'collection' => (is => 'ro', required => 1);
9 implements BUILD => as {
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()";
18 implements 'each' => as {
20 my $coll = $self->collection;
21 if (ref $coll eq 'ARRAY') {
22 foreach my $el (@$coll) {
26 $coll->reset if $coll->can('reset');
27 while (my $el = $coll->next) {