line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::MtPolicyd::Plugin::Result; |
2
|
|
|
|
|
|
|
|
3
|
21
|
|
|
21
|
|
113
|
use Moose; |
|
21
|
|
|
|
|
43
|
|
|
21
|
|
|
|
|
142
|
|
4
|
21
|
|
|
21
|
|
137503
|
use namespace::autoclean; |
|
21
|
|
|
|
|
46
|
|
|
21
|
|
|
|
|
158
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.23'; # VERSION |
7
|
|
|
|
|
|
|
# ABSTRACT: result returned by a plugin |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has 'action' => ( is => 'rw', isa => 'Maybe[Str]' ); |
10
|
|
|
|
|
|
|
has 'abort' => ( is => 'rw', isa => 'Bool', default => 0 ); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new_dunno { |
13
|
0
|
|
|
0
|
0
|
0
|
my $class = shift; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
0
|
my $obj = $class->new( |
16
|
|
|
|
|
|
|
action => 'dunno', |
17
|
|
|
|
|
|
|
abort => 1, |
18
|
|
|
|
|
|
|
); |
19
|
0
|
|
|
|
|
0
|
return($obj); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new_header { |
23
|
1
|
|
|
1
|
0
|
2
|
my ( $class, $header, $value ) = @_; |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
40
|
my $obj = $class->new( |
26
|
|
|
|
|
|
|
action => 'PREPEND '.$header.': '.$value, |
27
|
|
|
|
|
|
|
abort => 1, |
28
|
|
|
|
|
|
|
); |
29
|
1
|
|
|
|
|
7
|
return($obj); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub new_header_once { |
33
|
1
|
|
|
1
|
0
|
3
|
my ( $class, $is_done, $header, $value ) = @_; |
34
|
|
|
|
|
|
|
|
35
|
1
|
50
|
|
|
|
4
|
if( $is_done ) { |
36
|
0
|
|
|
|
|
0
|
return $class->new_dunno; |
37
|
|
|
|
|
|
|
} |
38
|
1
|
|
|
|
|
5
|
return $class->new_header($header, $value); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=pod |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=encoding UTF-8 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 NAME |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Mail::MtPolicyd::Plugin::Result - result returned by a plugin |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 VERSION |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
version 1.23 |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 AUTHOR |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Markus Benning <ich@markusbenning.de> |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This is free software, licensed under: |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
The GNU General Public License, Version 2, June 1991 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |