Showing 1 changed files with 7 additions and 6 deletions
+7 -6
lib/DBIx/Custom.pm
... ...
@@ -275,7 +275,7 @@ sub delete {
275 275
     $sql .= "from " . $self->_q($table) . " $where_clause ";
276 276
     
277 277
     # Execute query
278
-    return $self->execute($sql, $where_param, table => $table, %args);
278
+    return $self->execute($sql, $where_param, %args);
279 279
 }
280 280
 
281 281
 sub delete_all { shift->delete(allow_delete_all => 1, @_) }
... ...
@@ -639,7 +639,7 @@ sub insert {
639 639
       . $self->values_clause($param, {wrap => $wrap}) . " ";
640 640
     
641 641
     # Execute query
642
-    return $self->execute($sql, $param, table => $table, %args);
642
+    return $self->execute($sql, $param, %args);
643 643
 }
644 644
 
645 645
 sub update_or_insert {
... ...
@@ -864,10 +864,11 @@ sub select {
864 864
     my ($self, %args) = @_;
865 865
 
866 866
     # Arguments
867
-    my $table = delete $args{table};
867
+    my $table = $args{table};
868 868
     my $tables = ref $table eq 'ARRAY' ? $table
869 869
                : defined $table ? [$table]
870 870
                : [];
871
+    $args{table} = $tables;
871 872
     my $columns   = $args{column};
872 873
     my $where     = $args{where} || {};
873 874
     my $join      = $args{join} || [];
... ...
@@ -973,7 +974,7 @@ sub select {
973 974
       if $relation;
974 975
     
975 976
     # Execute query
976
-    my $result = $self->execute($sql, $where_param, table => $tables, %args);
977
+    my $result = $self->execute($sql, $where_param, %args);
977 978
     
978 979
     return $result;
979 980
 }
... ...
@@ -1105,7 +1106,7 @@ sub update {
1105 1106
     my $param;
1106 1107
     $param = shift if @_ % 2;
1107 1108
     my %args = @_;
1108
-    my $table = delete $args{table} || '';
1109
+    my $table = $args{table} || '';
1109 1110
     croak qq{"table" option must be specified } . _subname
1110 1111
       unless $table;
1111 1112
     my $p = delete $args{param} || {};
... ...
@@ -1166,7 +1167,7 @@ sub update {
1166 1167
     $sql .= $self->_q($table) . " set $assign_clause $where_clause ";
1167 1168
     
1168 1169
     # Execute query
1169
-    return $self->execute($sql, $param, table => $table, %args);
1170
+    return $self->execute($sql, $param, %args);
1170 1171
 }
1171 1172
 
1172 1173
 sub update_all { shift->update(allow_update_all => 1, @_) };