Technical Specialist
Chicago, IL
joel@joellimardo.com
SIP Phone (researching...)
Workadventure (researching...)
Downstream Project Status
BixChange
LIMSExpert.com
Upstream Projects
Joellimardo.com Project Cleanup
sudo cpan -i SQL::Load
My thinking about this module is that it is a good idea to keep SQL out of your code. I want to use it in conjunction with IO::DB, like so:
#...set up the DB (see the IO::DB example)
my $sql = SQL::Load->new('./'); #takes the path
my $basic = $sql->load('basic');
my $row = $db->sql_rows($basic->name('find'), 1);
ok($row->[0]->{the_desc} eq 'controlled air environment' ,
'Correct SQL fetch');
The only downside to this is a) you have to load a file in your code somewhere with all of the SQL statements and b) you have one more thing to version control.
/technical/upstream/perl/dbmanage Permanent Link Project Sitemap Top