DBD::SQLRelay - perl DBI driver for SQL Relay
use DBD::SQLRelay;
my $dbh = DBI -> connect ('dbi:SQLRelay:$dsn', $login, $password);
This module is a pure-Perl DBI binding to SQL Relay's native API. Connection string consists of following parts:
Don't ever try to share one SQLRelay connect by multiple scripts, for example, if you use
Apache mod_perl. Every $dbh holds one of server connections, so call disconnect()
directly
at the end of every script and don't use Apache::DBI or SQLRelay will be deadlocked.
If you use the HTML::Mason manpage, your handler.pl sould look like this:
...
{ package HTML::Mason::Commands; use DBI; use vars qw($db); } ...
sub handler { $HTML::Mason::Commands::dbh = DBI -> connect (...); my $status = $ah -> handle_request (...); $HTML::Mason::Commands::dbh -> disconnect; return $status; }
D. E. Ovsyanko, do@mobile.ru