[Dbix-class] Is this the canonical way to do this?

A. Pagaltzis pagaltzis at gmx.de
Thu Jun 8 04:27:50 CEST 2006

* John Napiorkowski <jjn1056 at yahoo.com> [2006-06-07 06:20]:
> I can still do:
> if( $c->model("db:video")->search({id=?id})->count )
> and this works but seems rather cludgy.  Have any of you found
> a cleaner and more correct way to do this type of check?

Maybe like so?

    if( $c->model("db:video")->count({id=?id}) )

Aristotle Pagaltzis // <http://plasmasturm.org/>

More information about the Dbix-class mailing list