run.pl my_lib.conf +templates common_js.html.ep invtot.html.ep libmap.html.ep +layouts default.html.ep +public index.html some .js files +lib MyLib.pm +MyLib Invtot.pm +Controller Invtot.pm #### package MyLib::Invtot; use Mojo::Base 'Mojolicious'; sub startup { my $app = shift; my $config = $app->config; $app->log->debug("connecting..."); $app->plugin( 'Database', { dsn => 'dbi:mysql:host=mysql.unifr.ch:dbname=dokpe_i01', username => $config->{username}, password => $config->{password}, options => { 'pg_enable_utf8' => 1, AutoCommit => 1, PrintError => 0, RaiseError => 1 }, helper => 'db', } ); } 1;