Scope::Container::DBI

DB connection manager with Scope::Container
Download

Scope::Container::DBI Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Masahiro Nagano
  • Publisher web site:
  • http://search.cpan.org/~kazeburo/

Scope::Container::DBI Tags


Scope::Container::DBI Description

DB connection manager with Scope::Container Scope::Container::DBI is DB connection manager that uses Scope::Container. You can control DB connection within any scope.SYNOPSIS use Scope::Container::DBI; use Scope::Container; FOO: { my $contaier = start_scope_container(); # first connect my $dbh = Scope::Container::DBI->connect( 'dbi:mysql:mydb;host=myhost', 'myuser', 'mypasswd', { RaiseError => 1, mysql_connect_timeout => 4, mysql_enable_utf8 => 1 } ); # same dsn, user/pass, and attributes, reuse connection my $dbh2 = Scope::Container::DBI->connect( 'dbi:mysql:mydb;host=myhost', 'myuser', 'mypasswd', { RaiseError => 1, mysql_connect_timeout => 4, mysql_enable_utf8 => 1 } ); #disconnect } BAR: { my $contaier = start_scope_container(); # connect randomly my $dbh = Scope::Container::DBI->connect( , , , ); # reuse randomly connected my $dbh2 = Scope::Container::DBI->connect( , , , ); } Requirements: · Perl


Scope::Container::DBI Related Software