| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Module::Features::PluginSystem; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
376057
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
37
|
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
222
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
|
7
|
|
|
|
|
|
|
our $DATE = '2024-03-17'; # DATE |
|
8
|
|
|
|
|
|
|
our $DIST = 'Module-Features-PluginSystem'; # DIST |
|
9
|
|
|
|
|
|
|
our $VERSION = '0.002'; # VERSION |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our %FEATURES_DEF = ( |
|
12
|
|
|
|
|
|
|
v => 2, |
|
13
|
|
|
|
|
|
|
summary => 'Features of plugin systems', |
|
14
|
|
|
|
|
|
|
description => <<'MARKDOWN', |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
**Glossary** |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
*Hook*: a named execution point where plugins' handlers get the chance to add |
|
19
|
|
|
|
|
|
|
behaviors. |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
*Plugin*: a code packaged in a Perl module that contains extra behaviors in one |
|
22
|
|
|
|
|
|
|
or more of /handler/s. |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
*Handler*: A subroutine (or method) in a /plugin/ that will get called in a |
|
25
|
|
|
|
|
|
|
/hook/. |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
*Priority*: a number between 0 and 100 signifying the order of execution of a |
|
28
|
|
|
|
|
|
|
handler compared to handlers for the same hook from other plugins. Lower number |
|
29
|
|
|
|
|
|
|
means a higher priority (executed first). Default priority if unspecified is 50. |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
MARKDOWN |
|
32
|
|
|
|
|
|
|
features => { |
|
33
|
|
|
|
|
|
|
can_let_plugin_contain_multiple_handlers => { |
|
34
|
|
|
|
|
|
|
summary => 'Whether a single plugin module (or class) can contain handlers for more than one hook', |
|
35
|
|
|
|
|
|
|
tags => ['category:packaging'], |
|
36
|
|
|
|
|
|
|
}, |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
can_let_plugin_skip_hook => {tags=>['category:flow']}, |
|
39
|
|
|
|
|
|
|
can_let_plugin_skip_other_plugins => {tags=>['category:flow']}, |
|
40
|
|
|
|
|
|
|
can_let_plugin_repeat_hook => {tags=>['category:flow']}, |
|
41
|
|
|
|
|
|
|
can_let_plugin_repeat_other_plugins => {tags=>['category:flow']}, |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
can_put_handler_in_other_hook => { |
|
44
|
|
|
|
|
|
|
summary=>'Allow a plugin handler for a hook to be assigned to another hook', |
|
45
|
|
|
|
|
|
|
tags=>['category:flow'], |
|
46
|
|
|
|
|
|
|
}, |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
can_handler_priority => {}, |
|
49
|
|
|
|
|
|
|
can_customize_handler_priority => {summary=>"Allow application user to customize the priority of a plugin's handler, without modifying source code"}, |
|
50
|
|
|
|
|
|
|
can_plugin_configuration => {summary=>'Allow plugin to have configuration; see also feature: '}, |
|
51
|
|
|
|
|
|
|
can_add_multiple_handlers_from_a_plugin => {summary=>'Allow adding a plugin instance multiple times'}, |
|
52
|
|
|
|
|
|
|
speed => {summary => 'Subjective speed rating, relative to other plugin system modules', schema=>['str', in=>[qw/slow medium fast/]], tags=>['category:speed']}, |
|
53
|
|
|
|
|
|
|
}, |
|
54
|
|
|
|
|
|
|
); |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
|
57
|
|
|
|
|
|
|
# ABSTRACT: Features of modules that generate text tables |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |