From: Matt S Trout Date: Sat, 16 Jul 2011 23:55:03 +0000 (+0000) Subject: switch literal FROM clause generation X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1312c585db3137118121fe9bb4626e969b35b47d;p=dbsrgits%2FSQL-Abstract.git switch literal FROM clause generation --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index c8563e0..a54dac3 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -10,7 +10,9 @@ use warnings; use Carp (); use List::Util (); use Scalar::Util (); -use Data::Query::Constants qw(DQ_IDENTIFIER DQ_OPERATOR DQ_VALUE); +use Data::Query::Constants qw( + DQ_IDENTIFIER DQ_OPERATOR DQ_VALUE DQ_LITERAL +); #====================================================================== # GLOBALS @@ -1220,7 +1222,13 @@ sub _table { elements => [ split /\Q$self->{name_sep}/, $from ], }) }, - SCALARREF => sub {$$from}, + SCALARREF => sub { + $self->_render_dq({ + type => DQ_LITERAL, + subtype => 'SQL', + literal => $$from + }) + }, }); }