[Catalyst] CDBI transactions

Brian Cooke mrkoffee at saltedsnail.com
Wed Jun 15 18:53:15 CEST 2005


> Hi Brian,
>
> I was mentioned in the daily summaries as volunteering to look
> into this as I wanted transactions.  However other commitments
> kept me from having time to do anything on this.

Ah, so it was in the summaries.  I totally understand about other  
commitments.

> What I was after was more wrapping each call to Catalyst up in a
> transaction.  So Catalyst would only commit if everything was okay,
> otherwise there would be an implicit rollback.

Interesting.  I'd personally be too nervous to keep AutoCommit off  
for that wide a scope, but I like the idea.  I basically went with  
the approach I did because it's basically the same thing that sri did  
in Maypole::Plugin::Transaction.

> However I see plenty of room for both approaches!

Agreed.  What about way to specify a particular action as being a  
single transaction?  Something like a keyword after the Global/Local/ 
Private:

sub do_atomically : Local Transaction {
     my ( $self, $c ) = @_
     # Do some stuff...
}

I was tossing that idea around in my head and wasn't quite ready to  
consider it (maybe for a future release), but now's as good a time as  
any to discuss it.


What I really need to do is bring this up on #catalyst, but they  
don't keep western U.S. hours over there (I'm in California).  By the  
time I get home where I can get on IRC, most of #catalyst has gone to  
bed.  So I just read the scrollback.  Some day I'll stay home and  
chat.  :-)



More information about the Catalyst mailing list