Your CGI Script 

#!/usr/bin/perl

use MyApp;
use HTTP::Engine;
my $engine = HTTP::Engine->new(
    interface => {
        module => 'CGI',
        request_handler => \&MyApp::handler
    }
);
$engine->run;