Krang::AddOn - module to manage Krang add-ons
use Krang::ClassLoader 'AddOn';
# install an addon
pkg('AddOn')->install(src => '/path/to/Turbo-1.00.tar.gz');
# get a list of installed addons
my @addons = pkg('AddOn')->find();
# find a particular addon by name
my ($addon) = pkg('AddOn')->find(name => $name);
# find a particular addon by conditional field in conf file set to true
# fields supported are EnableAdminSchedulerActions and EnableObjectSchedulerActions
my @addons = pkg('AddOn')->find(condition => 'EnableFeatureFoo')
# get the name and version of an addon $name = $addon->name; $version = $addon->version;
# remove an addon $addon->uninstall(verbose => 0);
# call all registered handlers of a particular name
pkg('AddOn')->call_handler($name, @args);
This module is responsible for managing Krang addons and their associated versions. See the add_ons.pod document in docs/ for a complete description of how add-ons work.
Krang::AddOn->install(src => $path, verbose => 1, force => 1)KrangUser.
The verbose option will cause install steps to be logged to STDERR.
The force option will allow an addon to be installed even if the
addon is already installed and version is greater than or equal to
this version.
$addon->uninstall(verbose => 1, force => 1)verbose option will cause uninstall steps
to be logged to STDERR. The force option will allow an addon to be
uninstalled even if an existing addon depends on it, otherwise the
method will die().
$name = $addon->name$version = $addon->version$conf = $addon->conf@addons = Krang::AddOn->find()pkg('AddOn')->call_handler($name, @args)
pkg('AddOn')->call_handler("NavigationHandler", $tree);
Two types of scheduler addons are supported. They are configured with the following directives in krang_addon.conf.
EnableAdminSchedulerActions 1
AdminSchedulerActionList Foo Bar
EnableObjectSchedulerActions 1
ObjectSchedulerActionList Foo Bar