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

NAME

App::Slackeria::PluginLoader - Plugin wrapper for App::Slackeria

SYNOPSIS

    use App::Slackeria::PluginLoader;

    my $plugin = App::Slackeria::PluginLoader->new();
    my $result;

    $plugin->load('CPAN', %cpan_default_conf);

    $result->{slackeria}->{CPAN} = $plugin->run('CPAN', {
            name => 'App-Slackeria',
            # further slackeria-specific configuration (if needed)
    });

    # $result->{slackeria}->{CPAN} is like:
    # {
    #     ok => 1,
    #     data => 'v0.1',
    #     href => 'http://search.cpan.org/dist/App-Slackeria/'
    # }

VERSION

version 0.12

DESCRIPTION

App::Slackeria::PluginLoader loads and executes a number of slackeria plugins. It also makes sure that any errors in plugins are catched and do not affect the code using App::Slackeria::PluginLoader.

METHODS

$plugin = App::Slackeria::PluginLoader->new()

Returns a new App::Slackeria::PluginLoader object. Does not take any arguments.

$plugin->load(plugin, %conf)

Create an internal App::Slackeria::Plugin::plugin object by using it and calling App::Slackeria::Plugin::plugin->new(%conf). If plugin does not exist or fails during setup, load prints an error message to STDERR.

$plugin->list()

Returns an array containing the names of all loaded plugins.

$plugin->run(plugin, $conf_ref)

Calls the run method of plugin: $plugin_object->run($conf_ref).

If plugin exists and is loaded, it returns the output of the run method, otherwise undef.

DEPENDENCIES

None.

SEE ALSO

slackeria(1), App::Slackeria::Plugin(3pm).

AUTHOR

Copyright (C) 2011 by Daniel Friesel <derf@finalrewind.org>

LICENSE

  0. You just DO WHAT THE FUCK YOU WANT TO.