Thanks, I'm fully aware of this! :)
My initial plan was to patch B::Deparse in a way to take the op-tree of the code-block and to produce SQL instead of Perl (or rather a semantically correct intermediate Perl representation which produces SQL)
> flattening of "(" and ")"
likewise, true lists are flattened but precedence is still visible in the op-tree
BUT for the moment I'm rather inclined to create subs OR() and AND() for a quick prototype.
That is taking multiple expressions after a prefixed operator.
WHERE { OR ( number EQ 3, AND ( customer LIKE '%...%', name IN qw/John Jane/, ) ) }
Thats not really much overhead, because when mixing AND and OR parens should always be applied to highlight precedence.
I'm very busy ATM but I'll show a proof of concept after next weekend.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re^2: [DSL] disabling packages in Perl?
by LanX
in thread [DSL] disabling packages in Perl?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |