NAME

Mojo::Server - Server Base Class

SYNOPSIS

use base 'Mojo::Server';

DESCRIPTION

Mojo::Server is a server base class.

ATTRIBUTES

build_tx_cb

build_transaction_callback

my $btx = $server->build_tx_cb;
$server = $server->build_tx_cb(sub {
    my $self = shift;
    return Mojo::Transaction->new;
});
my $btx = $server->build_transaction_callback;
$server = $server->build_transaction_callback(sub {
    my $self = shift;
    return Mojo::Transaction->new;
});

handler_cb

handler_callback

my $handler = $server->handler_cb;
$server     = $server->handler_cb(sub {
    my ($self, $tx) = @_;
    return $tx;
});
my $handler = $server->handler_callback;
$server     = $server->handler_callback(sub {
    my ($self, $tx) = @_;
    return $tx;
});

METHODS

Mojo::Server inherits all methods from Mojo::Base and implements the following new ones.

new

my $server = Mojo::Server->new;

log

$server->log('Test 123');

run

$server->run;