NAME

OO::Plugin::Class - collection for service classes.

EXPORTS

Classes

class PluginMessage

This class is used to provide a plugin with information about the current call. In its pure form the plugin manager is using objects of this class to communicate with callbacks.

Attribute.new: Parameters the method has been called with

Attribute.new: Data only available to a single plugin. This data would exists strictly within one execution chain and won't be exposed to the code from other plugins.

Attribute.new: Data shared among all the plugins. This attribute is similar to .private except this data is shared; i.e. what is set by one plugin can be read or changed by others.

set-rc:(OO::Plugin::Class::PluginMessage: $!rc is copy, *%_ --> Nil): This method sets the suggested return value for the current execution chain.
reset-rc:(OO::Plugin::Class::PluginMessage: *%_ --> Nil): Reset the suggested return value.
has-rc:(OO::Plugin::Class::PluginMessage: *%_ --> Bool): Returns _True_ if the suggested return value has been set.
rc:(OO::Plugin::Class::PluginMessage: *%_): Suggested return value

class MethodHandlerMsg

Inherits from PluginMessage. Used to provide information for method handlers.

Attribute.new: Instance of the object the original method has been called upon.

Attribute.new: Name of the method being called.

Attribute.new: Stage of method call. Can be one of three strings: _before_, _around_, _after_.

class <Plugin>

The base class of all plugins.

Attribute.new: The plugin manager object which created this plugin instance.

Attribute.new: Plugin's fully qualified name.

Attribute.new: Plugin's short name.

on-event:(OO::Plugin::Class::Plugin: Str:D $name, |): Event handler.
on-callback:(OO::Plugin::Class::Plugin: Str:D $cb-name, OO::Plugin::Class::PluginMessage:D $msg, |): Callback handler.

SEE Also

OO::Plugin::Manual, OO::Plugin::Manager, OO::Plugin::Class

AUTHOR

Vadim Belman <vrurg@cpan.org>