Tomas Doran wrote:
$c->model('myAppDB')->txn_do( sub {
my $rs = $c->model('myAppDB::Table')->search(..);
# Etc etc
die("Rollback") if $foo; # Exceptions cause rollback
# Etc etc
# If you get here, to the end, transaction is committed for you.
});
And I'm crap.
You need $c->model('myAppDB')->schema->txn_do( sub {
Cheers
t0m
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/