Zoidberg::PluginHash - magic plugin loader
use Zoidberg::PluginHash; my %plugins; tie %plugins, q/Zoidberg::PluginHash/, $parent; $plugins{foo}->bar();
Documentation about Zoidberg's plugin mechanism will be provided in an other document. FIXME tell where exactly.
This module hides some plugin loader stuff behind a transparent tie interface. You should regard the tied hash as a simple hash with object references. You can NOT store objects in the hash, all stored values are expected to be either a filename or a hash with meta data.
tie
The $parent object is expected to be a hash containing at least the array $parent->{settings}{data_dirs} which contains the search path for plugin meta data. Config data for plugins is located in $parent->{settings}{plugin_name}. Commands and events as defined by the plugins are stored in $parent->{commands} and $parent->{events}. These two hashes are expected to be tied with class Zoidberg::DispatchTable.
$parent
$parent->{settings}{data_dirs}
$parent->{settings}{plugin_name}
$parent->{commands}
$parent->{events}
In theory you can move plugins using the ref returned after deleteing them from the hash. Practicly only the most simple plugins can be moved to an other parent object.
Zoidberg::PluginHash depends on Zoidberg::Utils for reading files of various content types. Also it has special bindings for initialising Zoidberg::Fish objects.
Jaap Karssenberg || Pardus [Larus] <pardus@cpan.org>
Copyright (c) 2003 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Zoidberg, Zoidberg::Utils, Zoidberg::Fish, Zoidberg::DispatchTable, http://zoidberg.sourceforge.net
To install Zoidberg, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Zoidberg
CPAN shell
perl -MCPAN -e shell install Zoidberg
For more information on module installation, please visit the detailed CPAN module installation guide.