make cast expander stable
[scpubgit/Q-Branch.git] / maint / sqlacexpr
CommitLineData
c95da5ee 1use strictures 2;
3be8bc78 2use SQL::Abstract::ExtraClauses;
c95da5ee 3use Devel::DDCWarn;
3be8bc78 4
5warn $ARGV[1];
6
b3b54441 7my $sqlac = SQL::Abstract::ExtraClauses->new(
8 unknown_unop_always_func => 1,
9 lazy_join_sql_parts => 1,
10);
3be8bc78 11
c95da5ee 12my @args = ($ARGV[1] =~ /^\.\// ? do $ARGV[1] : eval '+('.$ARGV[1].')');
3be8bc78 13
c95da5ee 14die $@ if $@;
3be8bc78 15
b3b54441 16my ($q, @bind) = $sqlac->${\$ARGV[0]}(@args);
17
18Dwarn [ Q => @$q ];
19
eef0f203 20print STDERR $q->format."\n";
41a65f40 21Dwarn [ 0, @bind ];