From: Matt S Trout Date: Fri, 5 Apr 2019 00:31:46 +0000 (+0000) Subject: allow controlling SQL::Abstract class for test suite running X-Git-Tag: v1.90_01~260 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d5b7788a4027ca20b3e7fb1f2b4ba50ee619d2cd;p=dbsrgits%2FSQL-Abstract.git allow controlling SQL::Abstract class for test suite running --- diff --git a/lib/SQL/Abstract/Test.pm b/lib/SQL/Abstract/Test.pm index 343b1fa..8a455e2 100644 --- a/lib/SQL/Abstract/Test.pm +++ b/lib/SQL/Abstract/Test.pm @@ -7,6 +7,13 @@ use Test::Builder; use Test::Deep (); use SQL::Abstract::Tree; +if (my $class = $ENV{SQL_ABSTRACT_TEST_AGAINST}) { + my $mod = join('/', split '::', $class).".pm"; + require $mod; + eval qq{sub SQL::Abstract () { "\Q${class}\E" }; 1} + or die "Failed to create const sub for ${class}: $@"; +} + our @EXPORT_OK = qw( is_same_sql_bind is_same_sql is_same_bind eq_sql_bind eq_sql eq_bind dumper diag_where