From: Matt S Trout Date: Fri, 19 Apr 2019 01:48:22 +0000 (+0000) Subject: fuck wantarray X-Git-Tag: v1.90_01~173 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f9e868e7161c31b8b8d9965bb1f535da5cd29659;p=dbsrgits%2FSQL-Abstract.git fuck wantarray --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index bde5666..c397976 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.