[Catalyst] ->model-> return values?

Matt S Trout dbix-class at trout.me.uk
Mon Sep 25 05:04:01 CEST 2006

Roderick A. Anderson wrote:
> I'm 'looked-out'  Been searching and reading for the last two hours with 
> no good results.
> A pointer/suggestion/clue-stick would be appreciated.
> Do I need to wrap a
> 	$c->model( 'TheModel' )->update( ... )
> or
> 	$c->model( 'TheModel' )->delete( ... )
> in an eval block to check for success or failure or ( hope, hope, hope ) 
> can I just test the return value?

Assuming you're using DBIx::Class, it depens what you mean by success or 
failure - do you mean success as in "updated/deleted something" or as in "ran 
the appropriate query successfully" ?

      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +

More information about the Catalyst mailing list