my $db = DBI->connect(...); END {$db and $db->rollback and $db->disconnect}