NAME

Lim::Component - Base class for plugins

VERSION

See Lim for version.

SYNOPSIS

    package Lim::Plugin::MyPlugin;

    use base qw(Lim::Component);

    sub Module { 'MyPlugin'; }

    sub Calls { { ReadVersion => { out => { version => 'string' } } }; }

    sub Commands { { version => 1 }; }

DESCRIPTION

This is the base class of all plugins in Lim. It defines the name, RPC calls and CLI commands. It must be present for any plugin to work but the different plugin parts does not have to exist everywhere. For example the CLI part does not have to have the Server and Client but it will most likly have the Client part if you want to communicate with the Server.

METHODS

$plugin_name = Lim::Plugin::MyPlugin->Name

Returns the plugin's name.

This function must be overloaded or it will confess.

$plugin_description = Lim::Plugin::MyPlugin->Description

Returns the plugin's description.

$call_hash_ref = Lim::Plugin::MyPlugin->Calls

Returns a hash reference to the calls that can be made to this plugin, used both in Server and Client to verify input and output arguments.

Read more about this in Lim::Component::Server.

This function must be overloaded or it will confess.

$command_hash_ref = Lim::Plugin::MyPlugin->Commands

Returns a hash reference to the CLI commands that can be made by this plugin.

This function must be overloaded or it will confess.

$cli = Lim::Plugin::MyPlugin->CLI

Create a CLI object of the plugin, read more about this in Lim::Component::CLI.

$client = Lim::Plugin::MyPlugin->Client

Create a Client object of the plugin, read more about this in Lim::Component::Client.

$client = Lim::Plugin::MyPlugin->Server

Create a Server object of the plugin, read more about this in Lim::Component::Server.

AUTHOR

Jerry Lundström, <lundstrom.jerry at gmail.com>

BUGS

Please report any bugs or feature requests to https://github.com/jelu/lim/issues.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Lim::Component

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2012-2013 Jerry Lundström.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.