The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mojolicious::Dispatcher - Dispatcher

SYNOPSIS

    use Mojolicious::Dispatcher;

    my $routes = Mojolicious::Dispatcher->new;

DESCRIPTION

Mojolicous::Dispatcher is the default Mojolicious dispatcher.

ATTRIBUTES

Mojolicious::Dispatcher inherits all attributes from MojoX::Dispatcher::Routes and implements the following new ones.

method

    my $method  = $dispatcher->method;
    $dispatcher = $dispatcher->method(qr/GET|POST/);

user_agent

    my $ua      = $dispatcher->user_agent;
    $dispatcher = $dispatcher->user_agent(qr/GET|POST/);

METHODS

Mojolicious::Dispatcher inherits all methods from MojoX::Dispatcher::Routes and implements the following new ones.

match

    my $match = $routes->match($tx);