- or download this
# declare a db handle
# get a lock on the table
# call a subroutine from the module that does something to the db
# unlock the table
- or download this
use dbmodule;
my $dbh;
BEGIN {$dbh = DBModule_Start}
...
$sth = $dbh->prepare("BLAH BLAH") die $dbh->errstr;
$sth->execute or die $dbh->errstr;
DBModule_Sub1;
- or download this
my $module_dbh;
...
{
$module_dbh->disconnect;
}