>All,
>
>In his closing comments about UBB Kyle Dawkins made a statement that got me
>wondering. He said "there's SQL embedded all throughout the Perl everywhere
>(who does this?! oh my god, are they on crack?)". This comment got me
>wondering about alternatives to embedding SQL in to the code of a program.
>Alternatives I see are to use stored procedures which would limit one to
>using a certain DB server (or to be proficient in many servers and write
>stored procedures for all server flavors which would mean one is a very busy
>Perl and SQL guru) or possibly storing the embedded SQL in some sort of
>external file structure accessible via storable, XML::Simple or some other
>means.
I, as a crackhead, do embed my SQL into my modules. I've never liked
the idea of a central SQL library... Too many dependencies. If I
change one query in the library, I could end up breaking lots of
modules using that query.
I have, on occasion placed all the SQL into a %SQL global (since it's
static). Then it get's shared by all the apache processes when the
module loads.
Rob
--
"A good magician never reveals his secret; the unbelievable trick
becomes simple and obvious once it is explained. So too with UNIX."