Boucherot::PluginManager - A set of instance of Boucherot's Plugin
use Boucherot::PluginManager; use Boucherot::Plugin::MyPlugin;
my $plug=new Boucherot::Plugin::MyPlugin
# $plug has auto-registred it-self to the PluginManager
my $pm=new Boucherot::PluginManager;
# list of all plugins $pm->list
# remove all plugins that from a class $pm->removeall("Boucherot::Plugin::MyPlugin");
This class is a plugin manager.
A plugin manager is a class that maintain a list of all plugins instances.
The PluginManager is not the ModuleManager. The ModuleManager may contains some instance of any module. The PluginManager contains only Plugin, but also all Plugins.
And All plugins registered to the PluginManager are also registered with the ModuleManager.
class Boucherot::PluginManager
Attributs:
-$ instance : Boucherot::PluginManager - plugins : { mid1 => { "context" => context1 : SCALAR, "chan" => chan1 : SCALAR "mid" => mid1 : SCALAR "class" => class1 : SCALAR } , ... }
Methods:
+$ new () : Boucherot::PluginManager
Read
+ get ( mid : SCALAR ) : Plugin + list () : { mid1 => class1 : SCALAR , ... }
Write
+ add ( module : UNIVERSAL ) : + remove ( mid : SCALAR ) : + removeall ( class : SCALAR ) :
+$ new () : Boucherot::ModuleManager
Constructor. It takes no arguments, and return a module manager
+ get ( mid : SCALAR ) : Plugin
Return a given plugin.
+ list () : { mid1 => class1 : SCALAR , ... }
return the list of all plugins.
+ add ( plugin : UNIVERSAL ) : SCALAR
add a new plugin. Return the instance's mid.
+ remove ( mid : SCALAR ) :
remove an instance.
+ removeall ( class : SCALAR ) :
remove all instances of a given plugin.
This class was written by Arthibus Gissehel <gissehel@vachefolle.com> in 2001.
This class is part of the Boucherot project.