On Sat Jul 21 04:01:41 GMT 2007, mst wrote:
> >>> { foo => 1, bar => { '!=' => 2 } }
>
> [ -cond => 'and',
> [ -statement, ... ]
> [ -statement,
> [ -key => 'bar' ],
> [ -op => 'is_not' ],
> [ -value => 2 ],
> ],
> ]
[ -op, 'and', [ -op, 'is', ... ], [ -op, '!is', ... ] ]
And then…
I think the value should be an explicit list, so
[ -op, 'in', [ -ident ... ],
[ -list,
[ -value, \3 ],
[ -value, \4 ]
]
]
So then should not the previous example be:
[ -cond => 'and',
[ -list,
[ -statement, … ],
[ -statement,
[ -key => 'bar' ],
[ -op => 'is_not' ],
[ -value => 2 ],
],
]
]
Or does -list apply only to values?
Sod hashrefs, they only lead to annoyance.
It's pretty typical to do ASTs/IRs as array refs, anyway. They're
much more efficient, too.
Best,
David
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/dbix-class@lists.rawmode.org/