in reply to Seeking guidance for web/db application

Make the database handle an attribute stored in the Mojolicious application class. Better yet, make a DBIx::Connector object an attribute stored in the application class. Either way, that attibute will be available from within the controller, and can then be passed to your model. See the following Mojolicious documentation that shows examples both for full Mojolicious apps, and for Mojolicious::Lite apps:

https://github.com/kraih/mojo/wiki/Hypnotoad-prefork-web-server


Dave

  • Comment on Re: Seeking guidance for web/db application