use Mojolicious::Lite; use Mojolicious::Plugin::Database; use Data::Dumper; # Route with placeholder get '/invtot' => sub { my $c = shift; # my $foo = $c->param('foo'); # $c->render(text => "Hello from $foo."); $c->render("invtot"); post '/invtot' => sub { my $c = shift; my $p = $c->req->body_params->to_hash; print Dumper $p; } }; sub startup { my $self = shift; print "startup\n"; $self->plugin('database', { dsn => 'DBI:mysql:host=mysql....', username => 'd......r', password => '.....', options => { 'pg_enable_utf8' => 1, AutoCommit => 1, PrintError =>0, RaiseError => 1 }, helper => 'db', }); } # Start the Mojolicious command system app->start; __DATA__ @@ invtot.html.ep Paper Journals from the library

Paper Journals from the library

Select Title, ISSN, or Domain. Domains are 'Earth Sciences','Mathematics','Life Sciences','Chemistry','Physics','Environmental Sciences

Or enter some words from the title in any order. Use \" to search a phrase, and * for truncation. Choose AND to have all the words, OR to have any of them. AND OR ABO

#### use Mojolicious::Lite; use Mojolicious::Plugin::Database; use Data::Dumper; plugin 'Database' => { dsn => 'dbi:MySQL:host=mysql...:dbname=d...', username => 'd...', password => '....', options => { 'pg_enable_utf8' => 1, AutoCommit => 1, PrintError =>0, RaiseError => 1 }, helper => 'db', }; # Route with placeholder get '/invtot' => sub { my $c = shift; # my $foo = $c->param('foo'); # $c->render(text => "Hello from $foo."); $c->render("invtot"); post '/invtot' => sub { my $c = shift; my $p = $c->req->body_params->to_hash; print Dumper $p; print Dumper $c->app->attr('_dbh_db') } }; # Start the Mojolicious command system app->start; __DATA__ #as above