The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Convos::Plugin - Base class for Convos plugins

SYNOPSIS

  package Convos::Plugin::CoolPlugin;
  use Mojo::Base "Convos::Plugin";

  sub register {
    my ($self, $app, $config) = @_;

    $app->core->backend->on(connection => sub {
      my ($backend, $connection) = @_;
      warn "New connection!";
    });
  }

DESCRIPTION

Convos::Plugin is the base class for Convos plugins, which all plugins need to inherit from.

ATTRIBUTES

uri

  $path = $self->uri;

Holds a Mojo::Path object, with the URI to where this object should be stored.

METHODS

add_backend_helpers

  $self->add_backend_helpers($app);

Can be used to add "load" and "save" helpers for the given plugin.

SEE ALSO

Convos and Mojolicious::Plugin.