From: Matt S Trout Date: Fri, 19 Apr 2019 01:48:22 +0000 (+0000) Subject: fuck wantarray X-Git-Tag: v2.000000~3^2~194 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=00d171ae9ab089900880c59427e1f254514675c4;p=dbsrgits%2FSQL-Abstract.git fuck wantarray --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index a4a8baa..36c8210 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -322,9 +322,7 @@ sub _returning { my ($sql, @bind) = $self->render_aqt( $self->_expand_maybe_list_expr($f, -ident) ); - return wantarray - ? $self->_sqlcase(' returning ') . $sql - : ($self->_sqlcase(' returning ').$sql, @bind); + return ($self->_sqlcase(' returning ').$sql, @bind); } sub _expand_insert_value { @@ -540,7 +538,7 @@ sub render_expr { my ($sql, @bind) = $self->render_aqt( $self->expand_expr($expr, $default_scalar_to) ); - return (wantarray ? ($sql, @bind) : $sql); + return ($sql, @bind); } sub _normalize_op { @@ -1196,7 +1194,7 @@ sub join_query_parts { @parts; return ( join($join, map $_->[0], @final), - (wantarray ? (map @{$_}[1..$#$_], @final) : ()), + (map @{$_}[1..$#$_], @final), ); } @@ -1302,7 +1300,7 @@ sub _order_by { my $final_sql = $self->_sqlcase(' order by ').$sql; - return wantarray ? ($final_sql, @bind) : $final_sql; + return ($final_sql, @bind); } # _order_by no longer needs to call this so doesn't but DBIC uses it.