NAME

Mojolicious::Plugin::AgentCondition - Agent Condition Plugin

SYNOPSIS

# Mojolicious
$self->plugin('agent_condition');
$self->routes->route('/:controller/:action')->over(agent => qr/Firefox/);

# Mojolicious::Lite
plugin 'agent_condition';
get '/' => (agent => qr/Firefox/) => sub {...};

DESCRIPTION

Mojolicious::Plugin::AgentCondition is a routes condition for user agent based routes. This is a core plugin, that means it is always enabled and its code a good example for learning to build new plugins.

METHODS

Mojolicious::Plugin::AgentCondition inherits all methods from Mojolicious::Plugin and implements the following new ones.

register

$plugin->register;

Register condition in Mojolicious application.

SEE ALSO

Mojolicious, Mojolicious::Guides, http://mojolicio.us.