Evaluating user-defined conditions
Andrew Beverley
andy at andybev.com
Wed Jun 11 10:01:41 BST 2014
On Tue, 2014-06-10 at 13:43 +0200, Abigail wrote:
> > I'm going to need to allow strings to be matched. E.g:
> >
> > [age] > 10 && [name] eq "jon"
>
> Allow any string? Including strings that may potentially excute code?
> In that case, eval will be wrong. Or is the string just a list of
> alphanumerics? In which case, just add another clause to the definition
> of term.
The string could potentially be anything. So yes, eval's a bad idea, and
I need to spend some time looking at the various parser options that
people have kindly suggested.
Thanks,
Andy
More information about the london.pm
mailing list