Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Seeking guidance for web/db application

by davido (Cardinal)
on Mar 13, 2014 at 20:21 UTC ( [id://1078235]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1078235]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (8)
As of 2024-04-16 18:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found