#!/usr/bin/env perl use Mojolicious::Lite; get '/' => 'index'; post '/upload' => sub { my $self = shift; my $u = $self->req->upload('file'); use YAML; warn "Got file ", $u->filename, " size ", $u->size; warn "ISA ", ref $u; my $data = $u->slurp; warn "Contents:\n$data\n"; }; app->start; __DATA__ @@ index.html.ep % layout 'funky';