From: Matt S Trout Date: Mon, 1 Apr 2019 04:19:02 +0000 (+0000) Subject: extract expand_bind to a method X-Git-Tag: v2.000000~3^2~293 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=07dde11ea14b2209debbc61bd4ab3c08e377cbb1;p=dbsrgits%2FSQL-Abstract.git extract expand_bind to a method --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index eab0be1..1c87122 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -198,7 +198,7 @@ sub new { -and => '_expand_op_andor', -or => '_expand_op_andor', -nest => '_expand_nest', - -bind => sub { shift; +{ @_ } }, + -bind => '_expand_bind', -in => '_expand_in', -not_in => '_expand_in', -row => '_expand_row', @@ -1059,6 +1059,11 @@ sub _expand_nest { return $self->_expand_expr($v); } +sub _expand_bind { + my ($self, $op, $bind) = @_; + return { $op => $bind }; +} + sub _recurse_where { my ($self, $where, $logic) = @_;