better followiung principles
[scpubgit/Q-Branch.git] / maint / sqlacexpr
CommitLineData
c95da5ee 1use strictures 2;
3be8bc78 2use SQL::Abstract::ExtraClauses;
07070f1a 3#use 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
eef0f203 18print STDERR $q->format."\n";
07070f1a 19Dwarn [ @bind ];