Make join tests behave
[dbsrgits/SQL-Abstract-2.0-ish.git] / lib / SQL / Abstract / AST / v1.pm
index 0ce6e9f..a8860b5 100644 (file)
@@ -69,18 +69,14 @@ class SQL::Abstract::AST::v1 extends SQL::Abstract {
   }
 
   method _join(HashRef $ast) {
-    confess "'args' option to join should be an array ref, not " . dump($ast->{args})
-      unless is_ArrayRef($ast->{args});
-
-    my ($from, $to) = @{ $ast->{args} };
 
     # TODO: Validate join type
     my $type = $ast->{join_type} || "";
   
-    my @output = $self->dispatch($from);
+    my @output = $self->dispatch($ast->{lhs});
 
     push @output, uc $type if $type;
-    push @output, "JOIN", $self->dispatch($to);
+    push @output, "JOIN", $self->dispatch($ast->{rhs});
 
     push @output, 
         exists $ast->{on}