in reply to Navigating the plethora of SQL modules

Check out Class::Phrasebook::SQL. You might have to do some experimentation to get it just right, but it's a great starting point.

UPDATE:
The docs are bit confusing at first glance, so here is a quicky example:

use DBI; use Class::Phrasebook::SQL; use Data::Dumper; my $book = Class::Phrasebook::SQL->new(undef,'catalog.xml'); $book->load('MP3'); my $sth = $dbh->prepare($book->get('GET_SONGS')); $sth->execute('Genesis'); print Dumper $sth->fetchall_arrayref({});
And here is catalog.xml:
<?xml version="1.0"?> <!DOCTYPE phrasebook [ <!ELEMENT phrasebook (dictionary)*> <!ELEMENT dictionary (phrase)*> <!ATTLIST dictionary name CDATA #REQUIRED> <!ELEMENT phrase (#PCDATA)> <!ATTLIST phrase name CDATA #REQUIRED> ]> <phrasebook> <dictionary name="MP3"> <phrase name="GET_SONGS"> select * from songs where artist = ? </phrase> </dictionary> </phrasebook>
I think you can see how easy it would be to create a lookup hash that points to the catalog entries.

2UPDATE:
I really should give credit to eduardo for introducing me to this module. Oh, there is also a perl.com article that you should read as well.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: Re: Navigating the plethora of SQL modules
by mpeppler (Vicar) on Nov 25, 2003 at 15:18 UTC
    That's pretty neat! It's not stored procs, but it does help you to hide a lot of the underlying SQL implementation. I think I'll take a closer look at this for future projects.

    Michael