Workaround for double-call of destructors (based on 3d56e026 and e1d9e578)
authorPeter Rabbitson <ribasushi@cpan.org>
Thu, 12 Mar 2015 09:27:36 +0000 (10:27 +0100)
committerPeter Rabbitson <ribasushi@cpan.org>
Wed, 18 Mar 2015 13:34:14 +0000 (14:34 +0100)
commit87f4bab0f5f3d19480394feb0a7fffb952b9b754
treef784dfff177338b9ea1a478e886cb91137d049b8
parent3eb0ec803285437fb7f51248d16695778351bb89
Workaround for double-call of destructors (based on 3d56e026 and e1d9e578)

Silently fixing this up is nothing short of irresponsible, hence the
elaborate detection and alert mechanism

Instead of just marking all my DESTROYs with the function, also add it to a
base class, thus capturing *everything* there is to find. Yes it will be a
tad slower. And yes it will have a massive benefit to any DBIC user happening
to be caught in an unfriendly app-space

(cherry-pick of d63c9e64)
12 files changed:
Changes
lib/DBIx/Class.pm
lib/DBIx/Class/CDBICompat/DestroyWarning.pm
lib/DBIx/Class/ResultSource.pm
lib/DBIx/Class/Schema.pm
lib/DBIx/Class/Storage/DBI.pm
lib/DBIx/Class/Storage/DBI/Cursor.pm
lib/DBIx/Class/Storage/TxnScopeGuard.pm
lib/DBIx/Class/_Util.pm
t/lib/DBICTest.pm
t/lib/DBICTest/Util.pm
t/storage/txn_scope_guard.t