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

NAME

App::TeleGramma::Plugin::Base - Base class for TeleGramma plugins

VERSION

version 0.07

METHODS

truncated_package_name

Provide the name of the plugin, in perl form (hierarchy delimited with '::') but without the leading App::TeleGramma::Plugin.

short_name

Provide the name of the plugin, with the '::' separators changed to '-', and the leading 'App::TeleGramma::Plugin::' removed.

default_config

Override this method in your subclass if you want to provide a default configuration for your plugin (apart from the "enabled" flag).

synopsis

Override this method to provide a one-line synopsis of your plugin.

register

Override this method to register your plugin. It must setup any required listeners. See App::TeleGramma::Plugin::Core::Fortune for an example.

read_config

Read the configuration specific to this plugin.

Returns a hashref

reply_to

Reply to a message, with text.

Should be provided the Telegram::Bot::Message object, and the text string to respond with.

data_dir

Returns the path on disk that your plugin should store any data.

store

Returns an App::TeleGramma::Store object for you to persist your plugin data.

AUTHOR

Justin Hawkins <justin@eatmorecode.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Justin Hawkins <justin@eatmorecode.com>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.