Mojolicious::Plugin - Plugin Base Class


Mojolicious documentation Contained in the Mojolicious distribution.

Index


Code Index:

NAME

Top

Mojolicious::Plugin - Plugin Base Class

SYNOPSIS

Top

  use Mojo::Base 'Mojolicious::Plugin';

DESCRIPTION

Top

Mojolicious::Plugin is an abstract base class for Mojolicious plugins.

See Mojolicious::Plugins for more information.

METHODS

Top

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

register

  $plugin->register;

This method will be called by Mojolicious::Plugins at startup time, your plugin should use this to hook into the application. For instace by adding handlers and helpers to the renderer or using the add_hooks method of Mojolicious::Plugins to hook into the request flow.

SEE ALSO

Top

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


Mojolicious documentation Contained in the Mojolicious distribution.

package Mojolicious::Plugin;
use Mojo::Base -base;

# "This is Fry's decision.
#  And he made it wrong, so it's time for us to interfere in his life."
sub register { }

1;
__END__