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.
In reply to Re^5: Migrating to DBIx::Class
by Your Mother
in thread Migrating to DBIx::Class
by DBX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |