in reply to Database access and async web framework (like Mojolicious)
It might be worthwhile to take a look at DBIx::Connector.
From ibidem:
”You can store the connection somewhere in your app where you can easily access it, and for as long as it remains in scope, it will try its hardest to maintain a database connection. Even across forks (especially with DBI 1.614 and higher) and new threads, and even calls to $conn->dbh->disconnect. When you don't need it anymore, let it go out of scope and the database connection will be closed.”
|
---|