This issue has become a bit of a puzzle to me of late, probably because I've been fortunate to work with robust SQL implementations, and *very* large DBMS's, for a couple decades. The notion of hiding the SQL sounds all well and good, but when I witness the sort of encapsulation it leads to, I begin to wonder if I'm the only perl hacker that regularly deals with billion+ row tables.
While segregating the SQL from the other business logic is probably a good, idea, I'd advise caution before drinking the kool-aid of full blown OO-abstraction. If you're stuck with MySQL, Access, or some other limited SQL vernacular, I spose it makes some sense...but if your app is doing significant things with the data it returns (e.g., data mining, KD, etc.), it might be time to consider upgrading to a more robust DBMS that can support big chunks of that processing with its SQL syntax.
FWIW: DBI has been mentioned numerous times here; you may find
SQL::Preproc' a simpler/nimbler solution.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.