I meant the latter. Something like the example shown in the Class::DBI docs
here. This example shows how to do a query for objects of the current class, but you can use it to get objects of another class as well. Just call sth_to_objects() on the other class instead.