package Foo::Live; sub new { my $class = shift; return bless { iterator => Iterator->new(class => $class)->where(live => 1); }, class; }; sub next { my $self = shift; $self->{iterator}->next; };