in reply to Two ODBC Connections
The goal is to implement whole maintenance of connections in that slightly described module, other parts of application will just use it, not carrying if connection is already opened e.t.c.#configuration my $conf = " <MyConfPool> <connection id="firstconn"> ...DSN credentials </connection> <connection id="secondconn"> ...DSN credentials </connection> </MyConfPool>"; #create object holding connections use MyConnPool; my $conn_pool = MyConnPool->new(conf=>$conf); ... #use some connection my $conn1 = $conn_pool->get("firstconn"); $conn1->Sql(...); my $conn2 = $conn_pool->get("secondconn"); $conn2->Sql(...);
|
|---|