in reply to DBIX::Class and transactions

This is the easiest and most perly way: DBIx::Class::Storage::TxnScopeGuard.

sub foo { my ( $self, $schema ) = @_; my $guard = $schema->txn_scope_guard; # Multiple database operations here $guard->commit; }