Subject: | It's possible to leave txn_do without either commit or rollback |
The following pseudocode
while (1) {
$schema->txn_do(sub {
last;
});
}
leaves database's transaction in an inconsistent state (started but neither committed nor rolled back). While it's definitely a broken code, such error is really hard to debug and it'd be great if this situation could be caught & detected by DBIx::Class.