1MooseX::App::WritingPluUgsienrs(C3o)ntributed Perl DocumMeonotsaetXi:o:nApp::WritingPlugins(3)
2
3
4

NAME

6       MooseX::App::WritingPlugins - Writing plugins for MooseX::App
7

SYNOPSIS

9        package MooseX::App::Plugin::MyPlugin;
10
11        use Moose::Role;
12
13        sub plugin_metaroles {
14            my ($self,$class) = @_;
15            return {
16                class   => ['MooseX::App::Plugin::MyPlugin::Meta::Class'],
17            }
18        }
19
20        around 'initialize_command_class' => sub {
21           ...
22        };
23

DESCRIPTION

25       Plugins are implemented as Moose roles and must reside in the
26       MooseX::App::Plugin::* namespace. Metaclasses can be altered via the
27       'plugin_metaroles' callback method. Furthermore Moose method modifiers
28       (around, after, before) can be used to alter the behaviour of
29       MooseX::App or its meta classes.
30

CALLBACKS

32   plugin_metaroles
33       Optional callback method that should return a hash reference specifying
34       which metaroles will be applied to the class metaclass and its
35       contained metaclasses and helper classes.
36
37       Each key should in turn point to an array reference of role names.
38
39       It accepts the following keys:
40
41       •   class
42
43       •   attribute
44
45       •   method
46
47       •   wrapped_method
48
49       •   instance
50
51       •   constructor
52
53       •   destructor
54
55       •   error
56

METACLASSES

58       Most of MooseX-App behaviour is implemented in metaclass roles. When
59       writing plugins you will most likely need to alter/augument the
60       behaviour of these roles. Implementation details can be found in the
61       respective packages.
62
63       •   MooseX::App::Meta::Role::Class::Base is applied to the base
64           metaclass
65
66       •   MooseX::App::Meta::Role::Class::Command is applied to the command
67           metaclass
68
69       •   MooseX::App::Meta::Role::Attribute::Option is applied to all
70           attributes in the base and command meta classes
71
72
73
74perl v5.32.1                      2021-02-28    MooseX::App::WritingPlugins(3)
Impressum