From: Matt S Trout Date: Sat, 28 Jul 2012 12:45:32 +0000 (+0000) Subject: fix arrayref tables to use correct join generation style X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FSQL-Abstract.git;a=commitdiff_plain;h=31a41fd941aa5ecf168fa1276f92a027bd3a9377 fix arrayref tables to use correct join generation style --- diff --git a/lib/SQL/Abstract/Converter.pm b/lib/SQL/Abstract/Converter.pm index bc3efed..0439b1c 100644 --- a/lib/SQL/Abstract/Converter.pm +++ b/lib/SQL/Abstract/Converter.pm @@ -617,7 +617,8 @@ sub _table_to_dq { while (my $x = shift @f) { $dq = { type => DQ_JOIN, - join => [ $dq, $self->_table_to_dq($x) ] + left => $dq, + right => $self->_table_to_dq($x), }; } $dq; diff --git a/t/01generate.t b/t/01generate.t index a32fbe6..126a36d 100644 --- a/t/01generate.t +++ b/t/01generate.t @@ -5,6 +5,7 @@ use warnings; use Test::More; use Test::Warn; use Test::Exception; +use Data::Dumper; use SQL::Abstract::Test import => ['is_same_sql_bind']; @@ -585,7 +586,10 @@ for my $t (@tests) { ); } else { - $cref->(); + unless (eval { $cref->(); 1 }) { + die "Unexpected exception thrown for structure:\n" + .Dumper($t)."Exception was: $@"; + } } is_same_sql_bind( $stmt,