From: Matt S Trout Date: Tue, 27 Aug 2019 00:49:57 +0000 (+0000) Subject: make cast expander stable X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e07de273265e82517ca110db12ac8ab11b6b0edf;p=scpubgit%2FQ-Branch.git make cast expander stable --- diff --git a/lib/SQL/Abstract/ExtraClauses.pm b/lib/SQL/Abstract/ExtraClauses.pm index a632896..c9b332a 100644 --- a/lib/SQL/Abstract/ExtraClauses.pm +++ b/lib/SQL/Abstract/ExtraClauses.pm @@ -177,6 +177,7 @@ sub register_defaults { $self->clause_renderer("${stmt}.with", $with_renderer); } $self->expander(cast => sub { + return { -func => [ cast => $_[2] ] } if ref($_[2]) eq 'HASH'; my ($cast, $to) = @{$_[2]}; +{ -func => [ cast => { -as => [ $self->expand_expr($cast),