[dancer-users] how to make sure one db connection per user

Dancer New dancerfan2015 at gmail.com
Fri Sep 18 17:09:02 BST 2015


Hi,

I use Dancer::Plugin::Database in my application. Each time when
$dbh = DBI->connect( $c->{ dsn }, $c->{ username }, $c->{ password}, $c->{
dbi_params })
is called. does it return a new connection?


I would like one db connection for each user, where can I save the database
handler?

I try to save in session, but it doesn't work. Is session can only save
string, but not object?

Many thanks,
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150918/c40adc60/attachment.html>


More information about the dancer-users mailing list