Shawn M Moore > IM-Engine-0.06 > IM::Engine::HasPlugins

Download:
IM-Engine-0.06.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

IM::Engine::HasPlugins - role for objects that have plugins

DESCRIPTION ^

This should probably only be applied to IM::Engine objects. Beware!

ATTRIBUTES ^

plugins

METHODS ^

find_plugins

Return the IM::Engine::Plugin objects that return true for the passed coderef.

plugins_with

Return the IM::Engine::Plugin objects that do the particular role. For convenience, the role specifier has IM::Engine::Plugin:: prepended to it, unless it is prefixed with +.

each_plugin

For each plugin that does the role argument, invoke the callback argument. Returns nothing.

plugin_relay

For each plugin that does the role argument, call the method on it, passing the baton argument to it. The return value of method is used as the baton for the next plugin. The return value of this method is the final state of the baton.

This is useful for letting each plugin get a chance at modifying some value or object.

plugin_default

For each plugin that does the role argument, call the method on it. The first return value of method that is defined will be returned from this method.

This is useful for (among other things) letting each plugin get a chance at short-circuiting some other calculation.

plugin_collect

For each plugin that does the role argument, call the method on it. The return values of all method calls are collected into a list to be returned by this method.

This is useful for (among other things) letting each plugin contribute to constructor arguments.

syntax highlighting: