App::Slackeria::Plugin::Base - parent class for all slackeria plugins
use parent 'App::Slackeria::Plugin::Base'; sub check { my ($self) = @_; if (everything_ok()) { return { data => show_things(), }; } else { die("not found\n"); } }
version 0.11
App::Slackeria::Plugin::Base is not a plugin itself; it is meant to serve as a parent class for all other plugins.
Returns a new object. A reference to %conf is stored in $self->{default}.
Merges $self->{default} and $conf and saves the result in $self->{conf}. $conf takes precedence; $self->{default} and $conf are not touched in the process.
If $conf{enable} is set to 0, immediately returns { skip => 1 }.
It then calls the check function of App::Slackeria::Plugin::Something. If it fails (dies or returns undef), { ok => 0, data => $@} is returned.
The hashref returned by the check call is returned, with the additional key ok set to 1. Also, if $conf{href} is set, but check did not set a href key, href is set to $conf{href} with %s replaced by $conf{name}.
None.
slackeria(1), App::Slackeria::Plugin(3pm).
Copyright (C) 2011 by Daniel Friesel <derf@finalrewind.org>
0. You just DO WHAT THE FUCK YOU WANT TO.