[dancer-users] Dancer + objects + database

Juan José 'Peco' San Martín jsanmartin at gmail.com
Fri May 1 11:26:59 BST 2015

Hello all,

First, thank you for this awesome work!

I have a Dancer application that uses Apache + Plack::Handler to run it.

Currently, inside each Dancer route I'm forced to create the master object
of the application (i.e $object=Myapp->new(-login=>$login)) that it's a
huge structure, including the database handler.

/route1 => creates the $object, reconnects to the database
/route2 => creates the $object, reconnects to the database

Yep, doesn't make sense...

Is there a way to make the $object persistent (and the database connection
with it)?
Is this related to how the application is running (CGI)?

Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150501/8ab6641b/attachment.html>

More information about the dancer-users mailing list