You might look at Class::DBI::Sweet (look for the 'Automatic joins for search and count' line in the POD) or the experimental DBIx::Class. The second one is meant to be a replacement for Class::DBI with lots of nice features, but I feel it will take time until it will be usefull for production.
Comment on Re: Class::DBI Pagination with Table Joins
Nice. I wasn't aware of Class::DBI::Sweet. Just glancing at it, I'm not completely convinced it will do everything I need, but it may. It's definitely closer to what I need than anything else I've seen. Thanks++.