Work around DBIx::Class leak test bug for users of SQLA based DBIC dbic-leak-test-fix
authorMatt S Trout <mst@shadowcat.co.uk>
Sat, 10 Aug 2024 23:14:29 +0000 (23:14 +0000)
committerMatt S Trout <mst@shadowcat.co.uk>
Tue, 13 Aug 2024 20:56:46 +0000 (20:56 +0000)
commit5a61f8407eae959b32b8970169a972ef672ab7cd
tree0c80d72f5c0764ce65d0d12de6697effc322c1c0
parentbe2ee60b4178bb812711f66175b68aecce618e27
Work around DBIx::Class leak test bug for users of SQLA based DBIC

t/52leaks.t mistakenly treats non-closure anon sub declarations (which perl
caches in the optree) as a leak; introducing a spurious but minimally
invasive lexical makes them into closures and works around this.

Since people are considering testing SQLA against DBIx::Class via downgrading
to the last release before the hostile fork of SQLA::Classic and that release
is set in stone, this seems like the least horribad way to still pass the
DBIC t/ and xt/ test suites.
Changes
lib/SQL/Abstract.pm