MtPolicyd/Plugin/Action.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 21 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« MtPolicyd/Plugin/PostfixMap.pm ↑ Summary
1 package Mail::MtPolicyd::Plugin::Action;
2  
3 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 our $VERSION = '1.12'; # VERSION
7 # ABSTRACT: mtpolicyd plugin which just returns an action
8  
9  
10 3 extends 'Mail::MtPolicyd::Plugin';
11  
12 3 ▶use Mail::MtPolicyd::Plugin::Result;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 3 has 'action' => ( is => 'ro', isa => 'Str', required => 1 );
15  
16 sub run {
17 2 ▶ my ( $self, $r ) = @_;
Subroutine run: called CC=1 SCAR=0.0
Pod documented
18  
19 2 return Mail::MtPolicyd::Plugin::Result->new(
20 action => $self->action,
21 abort => 1,
22 );
23 }
24  
25 3 __PACKAGE__->meta->make_immutable;
26  
27 3 1;
28  
29  
30 __END__
31 =pod
32  
33 =head1 NAME
34  
35 Mail::MtPolicyd::Plugin::Action - mtpolicyd plugin which just returns an action
36  
37 =head1 VERSION
38  
39 version 1.12
40  
41 =head1 DESCRIPTION
42  
43 This plugin just returns the specified string as action.
44  
45 =head1 PARAMETERS
46  
47 =over
48  
49 =item action (required)
50  
51 A string with the action to return.
52  
53 =back
54  
55 =head1 EXAMPLE
56  
57 <Plugin reject-all>
58 module = "action"
59 # any postfix action will do
60 action=reject no reason
61 </Plugin>
62  
63 =head1 AUTHOR
64  
65 Markus Benning <ich@markusbenning.de>
66  
67 =head1 COPYRIGHT AND LICENSE
68  
69 This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>.
70  
71 This is free software, licensed under:
72  
73 The GNU General Public License, Version 2, June 1991
74  
75 =cut
76  
« MtPolicyd/Plugin/PostfixMap.pm ↑ Summary