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 08:14:05 +0000 (09:14 +0100)
commitd63c9e6418251a745cc6b6e1ef5ddf4b12ceb190
treea451865eefe34194ef928fac9077ece435f00b52
parent90a8030442ff2b9b6414ec9d8d7119b28d36426c
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
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