From: Matt S Trout Date: Mon, 1 Apr 2019 04:19:02 +0000 (+0000) Subject: extract expand_bind to a method X-Git-Tag: v1.90_01~272 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=59756d50b6d1df4a4bea23980f91c305eb9bd0a8;p=dbsrgits%2FSQL-Abstract.git extract expand_bind to a method --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index 2004c71..13f6e01 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) = @_;