line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::MtPolicyd::Plugin::Role::PluginChain; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
2092
|
use Moose::Role; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
28
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '2.01'; # VERSION |
6
|
|
|
|
|
|
|
# ABSTRACT: role for plugins to support a nested plugin chain |
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
15333
|
use Mail::MtPolicyd::PluginChain; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
573
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has 'chain' => ( |
11
|
|
|
|
|
|
|
is => 'ro', |
12
|
|
|
|
|
|
|
isa => 'Maybe[Mail::MtPolicyd::PluginChain]', |
13
|
|
|
|
|
|
|
lazy => 1, |
14
|
|
|
|
|
|
|
default => sub { |
15
|
|
|
|
|
|
|
my $self = shift; |
16
|
|
|
|
|
|
|
if( defined $self->Plugin ) { |
17
|
|
|
|
|
|
|
return Mail::MtPolicyd::PluginChain->new_from_config( |
18
|
|
|
|
|
|
|
$self->vhost_name, |
19
|
|
|
|
|
|
|
$self->Plugin, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
return; |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has 'Plugin' => ( is => 'rw', isa => 'Maybe[HashRef]' ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
after 'cron' => sub { |
29
|
|
|
|
|
|
|
my $self = shift; |
30
|
|
|
|
|
|
|
if( defined $self->chain ) { |
31
|
|
|
|
|
|
|
return $self->chain->cron(@_); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
return; |
34
|
|
|
|
|
|
|
}; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=pod |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=encoding UTF-8 |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 NAME |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Mail::MtPolicyd::Plugin::Role::PluginChain - role for plugins to support a nested plugin chain |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 VERSION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
version 2.01 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 AUTHOR |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Markus Benning <ich@markusbenning.de> |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
This is free software, licensed under: |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
The GNU General Public License, Version 2, June 1991 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |