Module::Pluggable::Singleton - call/return single plugins on demand using shortened names
package MyPluggable; use Module::Pluggable::Singleton; my $plugins = MyPluggable->plugin; my @plugins = MyPluggable->plugin; my @plugins = MyPluggable->plugins; my $plugin_long = $logic->plugin($name); my $plugins = MyPluggable->plugin; my $nick = MyPluggable->call('Robert','nickname',$person->full_name);
Return the instance of the plugin with given short name
$plugin = $logic->find('Bar');
Return an array of the shortened available plugins or the full name of the module when a short name is given
my @plugin_short = $logic->plugin my $plugin_long = $logic->plugin($name);
Return an array of all the module names
Using the plugin $plugin_name call $method with $params
$rv = $logic->call($plugin_name, $method, $params)
<tang.jason.ch at gmail.com>
Please report any bugs or feature requests to
bug-module-pluggable-singleton at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Module-Pluggable-Singleton. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
Copyright 2011 Jason Tang.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.