develooper Front page | perl.perl5.porters | Postings from March 2000

Re: hook for qs// operator for embedded SQL?

Thread Previous | Thread Next
M.J.T. Guy
March 20, 2000 00:15
Re: hook for qs// operator for embedded SQL?
Message ID:
[ Resending 'cos I forgot to copy to Joseph      :-( ]

"Joseph N. Hall" <> wrote
> I'd like to be able to do things like
>   # insert code to connect, select "default" database, etc here...
>   @rows = qs(select foo, bar from baz);
>   print "some element is $rows[5][1]\n";

How does this differ from

  sub qs { do_whatever_qs_operator_is_meant_to_do };

  @rows = qs("select foo, bar from baz");


Saving two quote characters doesn't seem like a big deal.   Or perhaps
you want to invent SQL-requests-as-objects?

Mike Guy

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About