From: Peter Rabbitson Date: Fri, 26 Feb 2010 23:25:13 +0000 (+0000) Subject: Lose a couple of oddball dependencies (while moronizing the tests a bit) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fdfbbc65cf3b44530ccca13adfde59069ed119ed;p=scpubgit%2FQ-Branch.git Lose a couple of oddball dependencies (while moronizing the tests a bit) --- diff --git a/Makefile.PL b/Makefile.PL index 801726e..b9162bf 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -10,15 +10,14 @@ author 'Nathan Wiger '; all_from 'lib/SQL/Abstract.pm'; -requires "List::Util" => 0; -requires "Scalar::Util" => 0; +requires 'List::Util' => 0; +requires 'Scalar::Util' => 0; +requires 'Storable' => 0; test_requires "Test::Builder" => 0; -test_requires "Test::Deep" => 0; test_requires "Test::More" => 0; test_requires "Test::Exception" => 0; test_requires "Test::Warn" => 0; -test_requires "Clone" => 0.31; tests_recursive 't'; diff --git a/lib/SQL/Abstract/Test.pm b/lib/SQL/Abstract/Test.pm index 8951e36..16450b7 100644 --- a/lib/SQL/Abstract/Test.pm +++ b/lib/SQL/Abstract/Test.pm @@ -6,7 +6,6 @@ use base qw/Test::Builder::Module Exporter/; use Data::Dumper; use Carp; use Test::Builder; -use Test::Deep qw(eq_deeply); our @EXPORT_OK = qw/&is_same_sql_bind &is_same_sql &is_same_bind &eq_sql_bind &eq_sql &eq_bind @@ -177,7 +176,10 @@ sub eq_sql_bind { sub eq_bind { my ($bind_ref1, $bind_ref2) = @_; - return eq_deeply($bind_ref1, $bind_ref2); + local $Data::Dumper::Useqq = 1; + local $Data::Dumper::Sortkeys = 1; + + return Dumper($bind_ref1) eq Dumper($bind_ref2); } sub eq_sql { diff --git a/t/04modifiers.t b/t/04modifiers.t index cce81f2..355ef67 100644 --- a/t/04modifiers.t +++ b/t/04modifiers.t @@ -7,8 +7,8 @@ use Test::Exception; use SQL::Abstract::Test import => ['is_same_sql_bind']; use Data::Dumper; +use Storable qw/dclone/; use SQL::Abstract; -use Clone; =begin Test -and -or and -nest modifiers, assuming the following: @@ -384,7 +384,7 @@ for my $case (@and_or_tests) { local $SIG{__WARN__} = sub { push @w, @_ }; my $sql = SQL::Abstract->new ($case->{args} || {}); - my $where_copy = Clone::clone ($case->{where}); + my $where_copy = dclone($case->{where}); lives_ok (sub { my ($stmt, @bind) = $sql->where($case->{where});