1MooX::Roles::Pluggable(U3s)er Contributed Perl DocumentatMiooonX::Roles::Pluggable(3)
2
3
4

NAME

6       MooX::Roles::Pluggable - Moo eXtension for pluggable roles
7

SYNOPSIS

9           package MyPackage;
10
11           use Moo;
12
13           sub foo { ... }
14
15           use MooX::Roles::Pluggable search_path => 'MyPackage::Role';
16
17           package MyPackage::Role::Bar;
18
19           use Moo::Role;
20
21           around foo => sub {
22               ...
23           };
24
25           1;
26

DESCRIPTION

28       This module allows a class consuming several roles based on rules
29       passed to Module::Pluggable::Object.
30
31       The basic idea behind this tool is the ability to have plugins as roles
32       which attach themselve using the "around", "before" and "behind" sugar
33       of Moo(se).
34
35       The arguments of import are redirected to Module::Pluggable::Object,
36       with following defaults (unless specified):
37
38       "search_path"
39           Default search_path is "${caller}::Role".
40
41       "require"
42           Default for require is 1.
43
44   USE WITH CAUTION
45       Remember that using a module like this which automatically injects code
46       into your existing and running and (hopefully) well tested programs
47       and/or modules can be dangerous and should be avoided whenever
48       possible.
49
50   USE ANYWAY
51       On the other hand, when you're allowing plugins being loaded by your
52       code, it's probably faster compiling the chain of responsibility once
53       than doing it at runtime again and again. Allowing plugins changing the
54       behaviour of your code anyway. When that's the intension, this is your
55       module.
56

AUTHOR

58       Jens Rehsack, "<rehsack at cpan.org>"
59

BUGS

61       Please report any bugs or feature requests to "bug-moox-roles-pluggable
62       at rt.cpan.org", or through the web interface at
63       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooX-Roles-Pluggable>.
64       I will be notified, and then you'll automatically be notified of
65       progress on your bug as I make changes.
66

SUPPORT

68       You can find documentation for this module with the perldoc command.
69
70           perldoc MooX::Roles::Pluggable
71
72       You can also look for information at:
73
74       •   RT: CPAN's request tracker (report bugs here)
75
76           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooX-Roles-Pluggable>
77
78       •   AnnoCPAN: Annotated CPAN documentation
79
80           <http://annocpan.org/dist/MooX-Roles-Pluggable>
81
82       •   CPAN Ratings
83
84           <http://cpanratings.perl.org/d/MooX-Roles-Pluggable>
85
86       •   Search CPAN
87
88           <http://search.cpan.org/dist/MooX-Roles-Pluggable/>
89

ACKNOWLEDGEMENTS

92       Copyright 2013-2015 Jens Rehsack.
93
94       This program is free software; you can redistribute it and/or modify it
95       under the terms of either: the GNU General Public License as published
96       by the Free Software Foundation; or the Artistic License.
97
98       See <http://dev.perl.org/licenses/> for more information.
99
100
101
102perl v5.36.0                      2023-01-20         MooX::Roles::Pluggable(3)
Impressum