On Wed, 20 Apr 2005 14:13:42 -0400, Larry Wall <[EMAIL PROTECTED]> wrote:
Heredocs are variants on q:to<SQLPROC> these days, but if you're going
to be mixing Perl and SQL syntax, it's probably better to dispense
with the heredoc and just have a language variant so that you can
parse it at compile time.  A heredoc would tend to delay your parse
till run-time, and you'd still have to mix up your parsers somehow.
I don't offhand see a good reason for delaying your parse till run
time, and I can see good reasons for wanting to make your SQL visible
to some optimizer or other at compile time.  (You can certainly parse
at compile time and delay various bindings till run time, so that's not
what is at issue here.)


Good point.

On Wed, 20 Apr 2005 14:14:47 -0400, Juerd <[EMAIL PROTECTED]> wrote:
What is the benefit of this syntax over having a simple function that
takes one argument, interpolating variables from CALLER::?

    for sql 'SELECT * FROM table WHERE id=$id' { ... }


You know, you are right. That would work. I just didn't put enough thought into it, or else I would have realized that the specialized quote serves no special purpose over a simple function.

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Reply via email to