[Dbix-class] faking ResultSets
Richard Jolly
Richard.Jolly at bbc.co.uk
Wed Jan 25 16:00:58 CET 2006
Hi,
We have a growing mismatch in our code between methods that return
ResultSet objects and those that return an array/arrayref of objects.
This is in a Catalyst model layer.
For the sake of api consistency I'd like to have a fake ResultSet class
that had the same api, but was just seeded with a list of objects.
ResultSet::Fake->new({ records => [@records] });
But I expect this wouldn't play well with the forthcoming release.
Is there a common solution to this problem? How do people keep their api
consistent?
Thanks, Richard
More information about the Dbix-class
mailing list