SYNOPSIS

use Server;
my $server = Server->new('app.psgi');

DESCRIPTION

Throws up an HTTP server on a random port, suitable for testing. Server logs will be printed to STDERR as test notes.

$server = Server->new($path);
$server = Server->new(\&app);
$server = Server->new(\&app, type => 'Starman');

Construct and "start" a new test HTTP server.

Get the app that was passed to "new".

Get a filehandle for reading the server's STDOUT.

Get the process identifier of the server.

Get the port number the server is listening on.

Get the URL for the server.

Get the type of server that was passed to "new".

$server->start;

Start the server.

$server->stop;

Stop the server. Called implicitly by DESTROY.

$env = $server->read_env;

Read a PSGI environment from the server, sent by "send_env" in Util.

10 POD Errors

The following errors were encountered while parsing the POD:

Around line 23:

Unknown directive: =method

Around line 44:

Unknown directive: =attr

Around line 48:

Unknown directive: =attr

Around line 52:

Unknown directive: =attr

Around line 56:

Unknown directive: =attr

Around line 60:

Unknown directive: =attr

Around line 64:

Unknown directive: =attr

Around line 77:

Unknown directive: =method

Around line 136:

Unknown directive: =method

Around line 161:

Unknown directive: =method