|my $txn = $tm->txn_scope(%args)||
Create a new DBIx::TransactionManager::ScopeGuards instance object.
You can pass an optional argument to %args, to tell the scope guard where the scope was generated, like so:
This will allow the guard object to report the callers location from the perspective of mymethod(), not where txn_scope() was called.
see DBIx::TransactionManager::ScopeGuards METHODS
Start the transaction.
txn_begin may optionally take a caller argument. This will allow you to provide caller information which will be used in in_transaction. For example if you have a wrapper function that calls txn_begin, you may want to let the user think that the caller was one stack above your wrapper.
Commit the current transaction.
If the $dbh is in a nested transaction, TransactionManager doesnt do COMMIT at here. TM just poped transaction stack and do nothing.
Rollback the current transaction.
If the $dbh is in a nested transaction, TransactionManager doesnt do ROLLBACK at here. TM just poped transaction stack and do nothing.
|$tm->in_transaction() : Bool||Returns true if $txn is currently in a middle of a transaction. While normally you only need to use this value as a boolean, it actually returns a hashref consisting of caller and pid element. This will tell you exactly where the currently valid transaction started.|
|perl v5.20.3||DBIX::TRANSACTIONMANAGER::DEVELOPERS (3)||2014-05-29|