logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Mojolicious::Plugin - Plugin base class

Description

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

       See "PLUGINS" in Mojolicious::Plugins for a list of plugins that are available by default.

Methods

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

   register
         $plugin->register(Mojolicious->new);
         $plugin->register(Mojolicious->new, {foo => 'bar'});

       This method will be called by Mojolicious::Plugins at startup time. Meant to be overloaded in a subclass.

Name

       Mojolicious::Plugin - Plugin base class

See Also

       Mojolicious, Mojolicious::Guides, <https://mojolicious.org>.

perl v5.40.0                                       2024-12-07                           Mojolicious::Plugin(3pm)

Synopsis

         # CamelCase plugin name
         package Mojolicious::Plugin::MyPlugin;
         use Mojo::Base 'Mojolicious::Plugin', -signatures;

         sub register ($self, $app, $conf) {

           # Magic here! :)
         }

See Also