in reply to Re^2: [DBIx::Class] Can I extract $dbhandle from schema?
in thread [DBIx::Class] Can I extract $dbhandle from schema?
Please note DBIx::Class is not sharing connections: every my $schema = My::DB->connect('dbi:mysql:DB', 'user', 'secret_password'); will remain separate from every other connection, but every query within an individual $schema will re-use the same connection as long as it is still open. Connections only get closed when the script finishes or when explicitly closed ($schema->disconnect;) or when timed-out server-side.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: [DBIx::Class] Can I extract $dbhandle from schema?
by Your Mother (Archbishop) on Jul 16, 2018 at 21:16 UTC | |
|
Re^4: [DBIx::Class] Can I extract $dbhandle from schema?
by wtgee (Initiate) on Aug 21, 2007 at 17:16 UTC | |
by CountZero (Bishop) on Aug 21, 2007 at 21:29 UTC | |
|
Re^4: [DBIx::Class] Can I extract $dbhandle from schema?
by Anonymous Monk on Aug 21, 2007 at 17:13 UTC |