MetaCPAN::Client returns a resultset, which has an iterator.  See https://metacpan.org/pod/MetaCPAN::Client::ResultSet

```
while ( my $author = $search->next ) {
...
}
```