[Catalyst] How safe are database transactions?

Xavier Robin robin0 at etu.unige.ch
Fri Jan 5 10:37:43 GMT 2007


On Thursday 04 January 2007 12:52, Chisel Wright wrote:
>         # try to add the reply to the thread
>         eval {
>             $new_reply = $c->model('ParleyDB')->schema->txn_do(
>                 sub { return $self->_txn_add_new_reply($c) }
>             );
> (...)
> [source: http://xrl.us/t4w3]
>
> and then all the db manipulation goes into "sub _txn_add_new_reply{...}"

That works perfectly, and I will reckon it to be sufficient for my needs. I 
just wanted to make sure I wasn't going to do the things completely wrong 
(and I was, indeed).
Thank you very much for all your kind answers!

Xavier

-- 
Some people says that if you play a Windows XP install CD backwards you will 
hear demon voices commanding you to worship Satan. But that's nothing. If you 
play it forward it will install Windows XP.



More information about the Catalyst mailing list