in reply to Re^4: Migrating to DBIx::Class
in thread Migrating to DBIx::Class

eval would work and it's a good suggestion, but it's inelegant and really, error handling should be built in.

A function which returns any number of objects, some being exceptions, other being results is what I see as inelegance. Having to explicitly test every return value not just for success--which is an easy && good Perl idiom--but also for type is nasty. Error handling at the application level is nice, so it's done only once. Otherwise it is required at every level in every conceptual unit; a nice petri dish for spaghetti.