From: Matt S Trout Date: Sat, 12 Oct 2019 18:10:08 +0000 (+0000) Subject: fix DBIC ident op expander compat wrapper to handle call as unop X-Git-Tag: v2.000000~3^2~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FSQL-Abstract.git;a=commitdiff_plain;h=cb6d0edbf56bf56f7cb65aa0d888aef9d0a06925 fix DBIC ident op expander compat wrapper to handle call as unop --- diff --git a/Changes b/Changes index fa8c255..ffc51c9 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for SQL::Abstract + - fix DBIC ident op expander compat wrapper to handle call as unop + 1.90_01 - 2019-10-09 - Complete overhaul of the internals, see the SQL::Abstract::Reference docs to understand the new implementation's affordances. diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index fdd6399..4fef402 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -301,11 +301,11 @@ sub new { s/\A\s+//, s/\s+\Z// for $sql; return [ $sql, @bind ]; }; - $opt{expand_op}{ident} = sub { + $opt{expand_op}{ident} = __PACKAGE__->make_unop_expander(sub { my ($self, undef, $body) = @_; $body = $body->from if Scalar::Util::blessed($body); $self->_expand_ident(ident => $body); - }; + }); } }