"Joseph N. Hall" <joseph@5sigma.com> wrote > Well, yes, first you could (in theory) make interpolation context-sensitive. > Again: > > @result = qs/select @cols from $table where $col = $val/ > > Here, @cols needs to be ,-separated, $table and $col need one kind of > interpolation, and $val needs another. So it looks like you want to define your qs function to have a sprintf()-like first argument: @result = qs("select %a from %t where %c = %v", \@cols, $table, $col, $val); where %a, %t etc trigger the appropriate form of interpolation. (Of course, % is a daft choice for escape character - I've just used it to illustrate the analogy with sprintf().) And it can look quite neat if you make your query proformas objects: my $query = new Query("select %a from %t where %c = %v"); @result = $query->qs(\@cols, $table, $col, $val); So my point is not so much "The qs() syntax is too valuable to let you have it" (though I suspect that would be the general p5p reaction) as "The syntax doesn't do anything you can't do already". You don't need any new syntax; you need new semantics, and that can be wrapped in what I've been calling the qs() subroutine. Mike GuyThread Previous | Thread Next