Don't rollback when TxnScopeGuard dtor is run twice ghpr/rejected/inspiring_3d56e026
authorNick Wellnhofer <wellnhofer@aevum.de>
Wed, 22 Oct 2014 21:12:39 +0000 (23:12 +0200)
committerNick Wellnhofer <wellnhofer@aevum.de>
Wed, 22 Oct 2014 21:12:39 +0000 (23:12 +0200)
commit13cfdad6ab07de4511cd129c7ed7c6ac58ccb4d3
tree854bc629bf8f32ad6be7e6f837762fa393e8e3a5
parentc96bf2bceade3ac0654ec8ae4379fc72ff82bed8
Don't rollback when TxnScopeGuard dtor is run twice

Modules like Plack::Middleware::StackTrace save a reference to the
guard object when a (nested) rollback exception is thrown during
destruction resulting in the destructor being called twice. Inactivate
the guard after the first rollback.
lib/DBIx/Class/Storage/TxnScopeGuard.pm