NAME

Mojolicious::Plugin::CallbackCondition - Callback Condition Plugin

SYNOPSIS

# Mojolicious
$self->plugin('callback_condition');
$self->routes->route('/:controller/:action')->over(cb => sub {
  my ($r, $c, $captures) = @_;
  ...
});

# Mojolicious::Lite
plugin 'callback_condition';
get '/' => (cb => sub {
  my ($r, $c, $captures) = @_;
  ...
}) => sub {...};

DESCRIPTION

Mojolicious::Plugin::CallbackCondition is a routes condition for callbacks. This is a core plugin, that means it is always enabled and its code a good example for learning to build new plugins. Note that this module is EXPERIMENTAL and might change without warning!

METHODS

Mojolicious::Plugin::CallbackCondition 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.