lib/Mail/DMARC/Report/Send.pm

filter: Statementstmt 100% 29 / 29 Branchbran 75.0% 3 / 4 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 3 totaltotal 86.9% 40 / 46 CC 4 SCAR 4.7
CC
4
Cov
94%
http
2.0
too_big_report
2.0
smtp
2.0
CRAP 1.6
« lib/Mail/DMARC/Report.pm ↑ Summary lib/Mail/DMARC/Report/Store/SQL/Grammars/SQLite.pm »
1 package Mail::DMARC::Report::Send;
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use feature 'signatures';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 our $VERSION = '2.20261110';
7  
8 4 ▶use parent 'Mail::DMARC::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶sub http($self) {
Subroutine http: called CC=2 SCAR=7.1
Pod undocumented
11 1 ▶ return $self->{http} if ref $self->{http};
Branch: 1 branch
BranchTrueFalseTotal
if ref $self->{"http"} 0 1 1
12 1 require Mail::DMARC::Report::Send::HTTP;
13 1 return $self->{http} = Mail::DMARC::Report::Send::HTTP->new();
14 }
15  
16 43 ▶sub smtp($self) {
Subroutine smtp: called CC=2 SCAR=6.9
Pod undocumented
17 43 ▶ return $self->{smtp} if ref $self->{smtp};
Branch: 1 branch
BranchTrueFalseTotal
if ref $self->{"smtp"} 2 41 43
18 41 require Mail::DMARC::Report::Send::SMTP;
19 41 return $self->{smtp} = Mail::DMARC::Report::Send::SMTP->new();
20 }
21  
22 1 ▶sub too_big_report( $self, $arg_ref ) {
Subroutine too_big_report: called CC=2 SCAR=6.9
Pod undocumented
23  
24 1 my $OrgName = $self->config->{organization}{org_name};
25 1 my $Domain = $self->config->{organization}{domain};
26 1 ▶ my $ver = $Mail::DMARC::Base::VERSION || ''; # undef in author environ
Condition50%1/2
$Mail::DMARC::Base::VERSION || ''
l!l
10
MC/DC0%0/1
$Mail::DMARC::Base::VERSION || ''
$Mail::DMARC::Base::VERSION
Truth table50%1/2
A
A= $Mail::DMARC::Base::VERSION
Aresult
11
00
27 1 my $uri = $arg_ref->{uri};
28 1 my $bytes = $arg_ref->{report_bytes};
29 1 my $report_id = $arg_ref->{report_id};
30 1 my $rep_domain = $arg_ref->{report_domain};
31 1 my $date = $self->smtp->get_timestamp_rfc2822;
32  
33 return <<"EO_TOO_BIG"
34  
35 This is a 'too big' DMARC notice. The aggregate report was NOT delivered.
36  
37 Report-Date: $date
38 Report-Domain: $rep_domain
39 Report-ID: $report_id
40 Report-Size: $bytes
41 Submitter: $Domain
42 Submitting-URI: $uri
43  
44 Submitted by $OrgName
45 Generated with Mail::DMARC $ver
46  
47 EO_TOO_BIG
48 1 ;
49 }
50  
51 4 1;
52  
53 __END__
« lib/Mail/DMARC/Report.pm ↑ Summary lib/Mail/DMARC/Report/Store/SQL/Grammars/SQLite.pm »