Perl: the Markov chain saw | |
PerlMonks |
Re: How can I get a database handler with Mojolicious::Plugin::Databaseby Veltro (Hermit) |
on Apr 03, 2019 at 08:17 UTC ( [id://1232066]=note: print w/replies, xml ) | Need Help?? |
Hi frazap I thought that the way how they solved it in this example was pretty neat: https://github.com/tempire/MojoExample/blob/master/lib/MojoFull.pm They set up a helper 'db' inside of the startup method that handles the connection. Hope this helps, Veltro edit And this is how I set up my connection:
Replace <YourSchemaLocation> with your schema, <DatabaseName> with your database, <LoginName> and <Password> with the MySQL credentials that you use. edit 2: Two more links that could be of interest for you:
In Section
Seekers of Perl Wisdom
|
|