---- within controller ---- # Get the first 10 results (getting all crashes the system! ) # Add in a join to get all the contents (ManyToMany relationship) $c->stash( repos => [ $c->model('ORIdatabase::Repo')->search( {} { join => 'contents', prefetch => 'contents', rows => '10' } ) ] ); ---- In Template ---- [% FOREACH repo IN repos -%]