If you are content with preparing them on the first invocation, you can use either ->prepare_cached or use the state keyword:
post '/invtot' => sub { state $st = $dbh->prepare(...); $st->execute(...); };
In reply to Re^3: How can I get a database handler with Mojolicious::Plugin::Database
by Corion
in thread How can I get a database handler with Mojolicious::Plugin::Database
by frazap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |