or download this
my $dbh=DBI->connect('dbi:...', 'user', 'pass', { RaiseError => 1, Aut
+oCommit => 1, ... });
$dbh->begin_work(); # if this fails, you have tried to nest transactio
+ns.
...
eval { $dbh->rollback() };
}
# At this point, either all changes or no changes have happened in the
+ database.