>> C'mon people, pitch in with arguments and opinions
>
>I'm personally attached to the following syntax:
>
>my $result = $dbic->resultset('MyApp')->find(xxx) ||
>$self->throw('Not Found Type Error');

+= 1

The common cases I use are: find_or_create(),find(), search or search_rs().
Generally if I use find() it's because I already have a key. If it fails it
means a data inconsistency and that's something I want to know about via an
exception rather than passing an undef into a subroutine and hoping lower
code layers are bullet-proof.

Regards, Peter
Dragonstaff Limited  http://www.dragonstaff.com  Business IT Consultancy


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to