line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::MtPolicyd::Plugin::SetField; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1000
|
use Moose; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
4
|
1
|
|
|
1
|
|
3973
|
use namespace::autoclean; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '2.01'; # VERSION |
7
|
|
|
|
|
|
|
# ABSTRACT: mtpolicyd plugin which just sets and key=value in the session |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extends 'Mail::MtPolicyd::Plugin'; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
78
|
use Mail::MtPolicyd::Plugin::Result; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
91
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has 'key' => ( is => 'rw', isa => 'Str', required => 1 ); |
15
|
|
|
|
|
|
|
has 'value' => ( is => 'rw', isa => 'Str', required => 1 ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub run { |
18
|
0
|
|
|
0
|
1
|
|
my ( $self, $r ) = @_; |
19
|
0
|
|
|
|
|
|
$r->session->{$self->key} = $self->value; |
20
|
0
|
|
|
|
|
|
return; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=pod |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=encoding UTF-8 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Mail::MtPolicyd::Plugin::SetField - mtpolicyd plugin which just sets and key=value in the session |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 VERSION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
version 2.01 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 DESCRIPTION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
This plugin can be used to set key/values within the session. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 EXAMPLE |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
<Plugin set-scanned> |
48
|
|
|
|
|
|
|
module = "SetField" |
49
|
|
|
|
|
|
|
key=mail-is-scanned |
50
|
|
|
|
|
|
|
value=1 |
51
|
|
|
|
|
|
|
</Plugin> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 AUTHOR |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Markus Benning <ich@markusbenning.de> |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This is free software, licensed under: |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
The GNU General Public License, Version 2, June 1991 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |