Addex/Output/SpamAssassin.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 18 / 18 CC 2 SCAR 3.4
CC
2
Cov
100%
process_entry
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« Addex/Output/ToFile.pm ↑ Summary Addex/AddressBook.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package App::Addex::Output::SpamAssassin 0.027;
5 # ABSTRACT: generate SpamAssassin whitelists from an address book
6  
7 1 ▶use parent qw(App::Addex::Output::ToFile);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 #pod =head1 DESCRIPTION
10 #pod
11 #pod This plugin produces a file that contains a list of SpamAssassin whitelist
12 #pod declarations.
13 #pod
14 #pod =head1 CONFIGURATION
15 #pod
16 #pod The valid configuration parameters for this plugin are:
17 #pod
18 #pod filename - the filename to which to write the whitelists
19 #pod
20 #pod =method process_entry
21 #pod
22 #pod $sa_outputter->process_entry($addex, $entry);
23 #pod
24 #pod This method does the actual writing of configuration to the file.
25 #pod
26 #pod =cut
27  
28 6 ▶sub process_entry {
Subroutine process_entry: called CC=2 SCAR=6.9
Pod documented
29 6 my ($self, $addex, $entry) = @_;
30  
31 6 $self->output("whitelist_from $_") for grep { $_->sends } $entry->emails;
32 }
33  
34 1 1;
35  
36 __END__
« Addex/Output/ToFile.pm ↑ Summary Addex/AddressBook.pm »