App-ProxyThat

 view release on metacpan or  search on metacpan

t/001_proxy.t  view on Meta::CPAN

    sleep 2;
    kill TERM => $f1;

} else {
    die "Can't fork!\n" unless defined $f1;

    my $f2 = fork;
    if ($f2) {
        local $SIG{ALRM} = sub { kill TERM => $f2 };
        alarm 2;
        local @ARGV = ( "http://localhost:$APP_PORT", '--port' => $PROXY_PORT );
        App::ProxyThat->new->run;

    } else {
        die "Can't fork!\n" unless defined $f2;

        my $runner = Plack::Runner->new;
        $runner->parse_options( '--port'   => $APP_PORT,
                                '--server' => 'Starman' );
        $runner->run(sub { [200, [], [$CONTENT]] });
        exit;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.665 second using v1.00-cache-2.02-grep-82fe00e-cpan-8097d9bc249 )