[Dbix-class] result testing

Angel Kolev ankolev at gmail.com
Tue Dec 11 09:11:05 GMT 2007


Hi guys.
How i can check if my $rs = 
$c->model('AppModelDB::Clients')->search({id=>$id}); succeed ?

If i try "myErrorFunc() unless defined $rs->first->id" (or something 
like this) the result is always "Caught exception in......... Cant call 
method "id" on undefined value.....". I just wanna know if that ID 
exists in my DB and throw Error screen if not.
Thanks



More information about the DBIx-Class mailing list