The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use CGI::Application::PSGI;
use MyApp;

my $handler = sub {
    my $env = shift;
    my $app = MyApp->new({ QUERY => CGI::PSGI->new($env) });
    CGI::Application::PSGI->run($app);
};