my $rs = $schema->resultset( 'Foo' ); while ( my $record = $rs->next ) { # do something with the record }