A while ago on p5p Joseph Hall allowed as how he would like to have core 
support for SQL via a construct like

        qs/SELECT * FROM s_emp WHERE empno IN (101, 343, 573)/

I suggested that one would need to know what database handle it was acting 
on, and that what made sense (to me) was to overload =~ to bind it to a 
specific handle, which left open the possibility of a default handle 
(maybe, the last one opened).  IIRC the results would go into a hash via 
something like bind_columns.

I haven't hear any more of this notion since the brief discussion, but this 
seems like a good time to bring it back up.  Now, I don't think the core 
should be burdened with notions of SQL, but the syntax is most 
appealing.  Conceivably, one could come up with other niche applications 
where something similar would be equally appealing.

So what about the possibility of user-defined q[a-z]// (using a letter that 
hadn't already been taken), where you get to specify the actions of =~ and 
probably more operators?  Sounds like it has a lot in common with operator 
overloading - maybe even just an extension to overload.pm?
--
Peter Scott
Pacific Systems Design Technologies

Reply via email to