From: Matt S Trout Date: Fri, 17 May 2019 02:21:25 +0000 (+0000) Subject: smarter sqlacexpr X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c95da5ee64648df5ff21f52ff69dd2105d4f5d62;p=scpubgit%2FQ-Branch.git smarter sqlacexpr --- diff --git a/maint/sqlacexpr b/maint/sqlacexpr index 63b41f6..e9cd322 100755 --- a/maint/sqlacexpr +++ b/maint/sqlacexpr @@ -1,12 +1,13 @@ +use strictures 2; use SQL::Abstract::ExtraClauses; -use Devel::Dwarn; +use Devel::DDCWarn; warn $ARGV[1]; -my @args = eval '('.$ARGV[1].')'; +my $sqlac = SQL::Abstract::ExtraClauses->new(unknown_unop_always_func => 1); -die $@ if $@; +my @args = ($ARGV[1] =~ /^\.\// ? do $ARGV[1] : eval '+('.$ARGV[1].')'); -my $sqlac = SQL::Abstract::ExtraClauses->new(unknown_unop_always_func => 1); +die $@ if $@; Dwarn([ $sqlac->${\$ARGV[0]}(@args) ]);