From: Peter Rabbitson Date: Sun, 2 Jun 2013 12:16:36 +0000 (+0200) Subject: Drop the silly Dumpered bind comparison X-Git-Tag: v1.74~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=328c5eac199064a99d36922e915ac454c406f28a;p=dbsrgits%2FSQL-Abstract.git Drop the silly Dumpered bind comparison --- diff --git a/Makefile.PL b/Makefile.PL index ddb1eef..b8c9d3f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -22,6 +22,7 @@ requires 'Hash::Merge' => 0.12; test_requires "Test::More" => 0.92; test_requires "Test::Exception" => 0; test_requires "Test::Warn" => 0; +test_requires "Test::Deep" => '0.101'; test_requires "Storable" => 0; # for cloning in tests no_index package => 'DBIx::Class::Storage::Debug::PrettyPrint'; diff --git a/lib/SQL/Abstract/Test.pm b/lib/SQL/Abstract/Test.pm index 2bc681e..16631fe 100644 --- a/lib/SQL/Abstract/Test.pm +++ b/lib/SQL/Abstract/Test.pm @@ -5,6 +5,7 @@ use warnings; use base qw/Test::Builder::Module Exporter/; use Data::Dumper; use Test::Builder; +use Test::Deep (); use SQL::Abstract::Tree; our @EXPORT_OK = qw/&is_same_sql_bind &is_same_sql &is_same_bind @@ -102,14 +103,7 @@ sub eq_sql_bind { } -sub eq_bind { - my ($bind_ref1, $bind_ref2) = @_; - - local $Data::Dumper::Useqq = 1; - local $Data::Dumper::Sortkeys = 1; - - return Dumper($bind_ref1) eq Dumper($bind_ref2); -} +sub eq_bind { goto &Test::Deep::eq_deeply }; sub eq_sql { my ($sql1, $sql2) = @_;