BIMI/Options.pm

filter: Statementstmt 85.0% 51 / 60 Branchbran n/a Conditioncond 25.8% 8 / 31 MC/DCmcdc 0.0% 0 / 15 Subroutinesub 67.8% 19 / 28 Podpod n/a totaltotal 58.2% 78 / 134 CC 16 SCAR 11.7
CC
16
Cov
65%
__ANON__
6.0
__ANON__
6.0
__ANON__
6.0
CRAP 3.2
« BIMI/Record/Location.pm ↑ Summary BIMI/Role/HasError.pm »
1 package Mail::BIMI::Options;
2 # ABSTRACT: Shared options
3 30 our $VERSION = '3.20260302'; # VERSION
4 30 ▶use 5.20.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 30 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 30 ▶use Mail::BIMI::Prelude;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 36 ▶has cache_backend => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_CACHE_BACKEND}//$ENV{MAIL_BIMI_CACHE_DEFAULT_BACKEND}//'File'},
Subroutine __ANON__: called CC=3 SCAR=14.2
Condition40%2/5
($ENV{"MAIL_BIMI_CACHE_BACKEND"} // $ENV{"MAIL_BIMI_CACHE_DEFAULT_BACKEND"}) // "File"
l!l
360
$ENV{"MAIL_BIMI_CACHE_BACKEND"} // $ENV{"MAIL_BIMI_CACHE_DEFAULT_BACKEND"}
l!l&&r!l&&!r
3600
MC/DC0%0/2
($ENV{"MAIL_BIMI_CACHE_BACKEND"} // $ENV{"MAIL_BIMI_CACHE_DEFAULT_BACKEND"}) // "File"
$ENV{"MAIL_BIMI_CACHE_BACKEND"} $ENV{"MAIL_BIMI_CACHE_DEFAULT_BACKEND"}
Truth table33%1/3
A // B
A= $ENV{"MAIL_BIMI_CACHE_BACKEND"}B= $ENV{"MAIL_BIMI_CACHE_DEFAULT_BACKEND"}
ABresult
1X1
011
000
10 30 documentation => 'Cache backend to use for cacheing' );
11 0 ▶has cache_fastmmap_share_file => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_CACHE_FASTMMAP_SHARE_FILE}//'/tmp/mail-bimi.fastmmap'},
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
$ENV{"MAIL_BIMI_CACHE_FASTMMAP_SHARE_FILE"} // "/tmp/mail-bimi.fastmmap"
l!l
00
MC/DC0%0/1
$ENV{"MAIL_BIMI_CACHE_FASTMMAP_SHARE_FILE"} // "/tmp/mail-bimi.fastmmap"
$ENV{"MAIL_BIMI_CACHE_FASTMMAP_SHARE_FILE"}
Truth table0%0/2
A
A= $ENV{"MAIL_BIMI_CACHE_FASTMMAP_SHARE_FILE"}
Aresult
11
00
12 30 documentation => 'Shared cache file when using FastMmap backend' );
13 0 ▶has cache_file_directory => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_CACHE_FILE_DIRECTORY}//'/tmp/'},
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
$ENV{"MAIL_BIMI_CACHE_FILE_DIRECTORY"} // "/tmp/"
l!l
00
MC/DC0%0/1
$ENV{"MAIL_BIMI_CACHE_FILE_DIRECTORY"} // "/tmp/"
$ENV{"MAIL_BIMI_CACHE_FILE_DIRECTORY"}
Truth table0%0/2
A
A= $ENV{"MAIL_BIMI_CACHE_FILE_DIRECTORY"}
Aresult
11
00
14 30 documentation => 'Directory to store Cache files in when using File backend' );
15 26 ▶has force_record => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_FORCE_RECORD}},
Subroutine __ANON__: called CC=1 SCAR=0.0
16 30 documentation => 'Fake record to use' );
17 21 ▶has http_client_timeout => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_HTTP_CLIENT_TIMEOUT}//3},
Subroutine __ANON__: called CC=2 SCAR=7.6
Condition50%1/2
$ENV{"MAIL_BIMI_HTTP_CLIENT_TIMEOUT"} // 3
l!l
021
MC/DC0%0/1
$ENV{"MAIL_BIMI_HTTP_CLIENT_TIMEOUT"} // 3
$ENV{"MAIL_BIMI_HTTP_CLIENT_TIMEOUT"}
Truth table50%1/2
A
A= $ENV{"MAIL_BIMI_HTTP_CLIENT_TIMEOUT"}
Aresult
11
00
18 30 documentation => 'Timeout value for HTTP' );
19 8 ▶has http_client_max_redirect => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_HTTP_CLIENT_MAX_REDIRECT}//3},
Subroutine __ANON__: called CC=2 SCAR=7.6
Condition50%1/2
$ENV{"MAIL_BIMI_HTTP_CLIENT_MAX_REDIRECT"} // 3
l!l
08
MC/DC0%0/1
$ENV{"MAIL_BIMI_HTTP_CLIENT_MAX_REDIRECT"} // 3
$ENV{"MAIL_BIMI_HTTP_CLIENT_MAX_REDIRECT"}
Truth table50%1/2
A
A= $ENV{"MAIL_BIMI_HTTP_CLIENT_MAX_REDIRECT"}
Aresult
11
00
20 30 documentation => 'Maximum redirects to follow for HTTP' );
21 1 ▶has dns_client_timeout => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_DNS_CLIENT_TIMEOUT}//5},
Subroutine __ANON__: called CC=2 SCAR=7.6
Condition50%1/2
$ENV{"MAIL_BIMI_DNS_CLIENT_TIMEOUT"} // 5
l!l
01
MC/DC0%0/1
$ENV{"MAIL_BIMI_DNS_CLIENT_TIMEOUT"} // 5
$ENV{"MAIL_BIMI_DNS_CLIENT_TIMEOUT"}
Truth table50%1/2
A
A= $ENV{"MAIL_BIMI_DNS_CLIENT_TIMEOUT"}
Aresult
11
00
22 30 documentation => 'Timeout value for DNS' );
23 30 ▶has no_location_with_vmc => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_NO_LOCATION_WITH_VMC}},
Subroutine __ANON__: called CC=1 SCAR=0.0
24 30 documentation => 'Do not check location if VMC was present' );
25 0 ▶has cert_subdomain_is_valid => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_CERT_SUBDOMAIN_IS_VALID}//0},
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
$ENV{"MAIL_BIMI_CERT_SUBDOMAIN_IS_VALID"} // 0
l!l
00
MC/DC0%0/1
$ENV{"MAIL_BIMI_CERT_SUBDOMAIN_IS_VALID"} // 0
$ENV{"MAIL_BIMI_CERT_SUBDOMAIN_IS_VALID"}
Truth table0%0/2
A
A= $ENV{"MAIL_BIMI_CERT_SUBDOMAIN_IS_VALID"}
Aresult
11
00
26 30 documentation => 'Should VMCs be valid for any subdomain of their altname' );
27 1 ▶has no_validate_cert => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_NO_VALIDATE_CERT}},
Subroutine __ANON__: called CC=1 SCAR=0.0
28 30 documentation => 'Do not validate VMC' );
29 23 ▶has no_validate_svg => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_NO_VALIDATE_SVG}},
Subroutine __ANON__: called CC=1 SCAR=0.0
30 30 documentation => 'Do not validate SVG' );
31 67 ▶has require_dkim => ( is => 'rw', lazy => 0, default => sub {return $ENV{MAIL_BIMI_REQUIRE_DKIM}},
Subroutine __ANON__: called CC=1 SCAR=0.0
32 30 documentation => 'Require DKIM authentication' );
33 23 ▶has require_vmc => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_REQUIRE_VMC}},
Subroutine __ANON__: called CC=1 SCAR=0.0
34 30 documentation => 'Require VMC validation' );
35 0 ▶has no_experimental_vmc => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_NO_EXPERIMENTAL_VMC}//0},
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
$ENV{"MAIL_BIMI_NO_EXPERIMENTAL_VMC"} // 0
l!l
00
MC/DC0%0/1
$ENV{"MAIL_BIMI_NO_EXPERIMENTAL_VMC"} // 0
$ENV{"MAIL_BIMI_NO_EXPERIMENTAL_VMC"}
Truth table0%0/2
A
A= $ENV{"MAIL_BIMI_NO_EXPERIMENTAL_VMC"}
Aresult
11
00
36 30 documentation => 'Disallow VMCs marked as experimental' );
37 0 ▶has allowed_mark_types => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_ALLOWED_MARK_TYPES}//'*'},
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
$ENV{"MAIL_BIMI_ALLOWED_MARK_TYPES"} // "*"
l!l
00
MC/DC0%0/1
$ENV{"MAIL_BIMI_ALLOWED_MARK_TYPES"} // "*"
$ENV{"MAIL_BIMI_ALLOWED_MARK_TYPES"}
Truth table0%0/2
A
A= $ENV{"MAIL_BIMI_ALLOWED_MARK_TYPES"}
Aresult
11
00
38 30 documentation => 'Optional comma separated list of allowed Certificate Mark Types' );
39 0 ▶has ssl_root_cert => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_SSL_ROOT_CERT}//undef},
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
$ENV{"MAIL_BIMI_SSL_ROOT_CERT"} // undef
l!l
00
MC/DC0%0/1
$ENV{"MAIL_BIMI_SSL_ROOT_CERT"} // undef
$ENV{"MAIL_BIMI_SSL_ROOT_CERT"}
Truth table0%0/2
A
A= $ENV{"MAIL_BIMI_SSL_ROOT_CERT"}
Aresult
11
00
40 30 documentation => 'Location of SSL Root Cert Bundle - Defaults to Mozilla::CA bundle plus Known BIMI Root Certs' );
41 11 ▶has strict_spf => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_STRICT_SPF}},
Subroutine __ANON__: called CC=1 SCAR=0.0
42 30 documentation => 'Disallow SPF +all' );
43 21 ▶has svg_from_file => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_SVG_FROM_FILE}},
Subroutine __ANON__: called CC=1 SCAR=0.0
44 30 documentation => 'Fake SVG with file contents' );
45 8 ▶has svg_max_fetch_size => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_SVG_MAX_FETCH_SIZE}//65535},
Subroutine __ANON__: called CC=2 SCAR=7.6
Condition50%1/2
$ENV{"MAIL_BIMI_SVG_MAX_FETCH_SIZE"} // 65535
l!l
08
MC/DC0%0/1
$ENV{"MAIL_BIMI_SVG_MAX_FETCH_SIZE"} // 65535
$ENV{"MAIL_BIMI_SVG_MAX_FETCH_SIZE"}
Truth table50%1/2
A
A= $ENV{"MAIL_BIMI_SVG_MAX_FETCH_SIZE"}
Aresult
11
00
46 30 documentation => 'Maximum fetch size for SVG retrieval' );
47 23 ▶has svg_max_size => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_SVG_MAX_SIZE}//32768},
Subroutine __ANON__: called CC=2 SCAR=7.6
Condition50%1/2
$ENV{"MAIL_BIMI_SVG_MAX_SIZE"} // 32768
l!l
023
MC/DC0%0/1
$ENV{"MAIL_BIMI_SVG_MAX_SIZE"} // 32768
$ENV{"MAIL_BIMI_SVG_MAX_SIZE"}
Truth table50%1/2
A
A= $ENV{"MAIL_BIMI_SVG_MAX_SIZE"}
Aresult
11
00
48 30 documentation => 'Maximum valid size for SVG' );
49 9 ▶has svg_profile => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_SVG_PROFILE}//'SVG_1.2_PS'},
Subroutine __ANON__: called CC=2 SCAR=7.6
Condition50%1/2
$ENV{"MAIL_BIMI_SVG_PROFILE"} // "SVG_1.2_PS"
l!l
09
MC/DC0%0/1
$ENV{"MAIL_BIMI_SVG_PROFILE"} // "SVG_1.2_PS"
$ENV{"MAIL_BIMI_SVG_PROFILE"}
Truth table50%1/2
A
A= $ENV{"MAIL_BIMI_SVG_PROFILE"}
Aresult
11
00
50 30 documentation => 'Profile name to use for SVG validation' );
51 57 ▶has verbose => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_VERBOSE}},
Subroutine __ANON__: called CC=1 SCAR=0.0
52 30 documentation => 'Be More Verbose' );
53 0 ▶has vmc_from_file => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_VMC_FROM_FILE}},
Subroutine __ANON__: not called CC=1 SCAR=6.9
54 30 documentation => 'Fake VMC with file contents' );
55 0 ▶has vmc_no_check_alt => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_VMC_NO_CHECK_ALT}},
Subroutine __ANON__: not called CC=1 SCAR=6.9
56 30 documentation => 'Do not check the alt name of a VMC' );
57 0 ▶has vmc_max_fetch_size => ( is => 'rw', lazy => 1, default => sub {return $ENV{MAIL_BIMI_VMC_MAX_FETCH_SIZE}//65535},
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
$ENV{"MAIL_BIMI_VMC_MAX_FETCH_SIZE"} // 65535
l!l
00
MC/DC0%0/1
$ENV{"MAIL_BIMI_VMC_MAX_FETCH_SIZE"} // 65535
$ENV{"MAIL_BIMI_VMC_MAX_FETCH_SIZE"}
Truth table0%0/2
A
A= $ENV{"MAIL_BIMI_VMC_MAX_FETCH_SIZE"}
Aresult
11
00
58 30 documentation => 'Maximum fetch size for VMC retrieval' );
59  
60 30 1;
61  
62 __END__
63  
64 =pod
65  
66 =encoding UTF-8
67  
68 =head1 NAME
69  
70 Mail::BIMI::Options - Shared options
71  
72 =head1 VERSION
73  
74 version 3.20260302
75  
76 =head1 DESCRIPTION
77  
78 Class for capturing caller options, which may be passed to the constructor, or set in environment
79  
80 =head1 ATTRIBUTES
81  
82 These values are derived from lookups and verifications made based upon the input values, it is however possible to override these with other values should you wish to, for example, validate a record before it is published in DNS, or validate an Indicator which is only available locally
83  
84 =head2 allowed_mark_types
85  
86 is=rw
87  
88 Optional comma separated list of allowed Certificate Mark Types
89  
90 =head2 cache_backend
91  
92 is=rw
93  
94 Cache backend to use for cacheing
95  
96 =head2 cache_fastmmap_share_file
97  
98 is=rw
99  
100 Shared cache file when using FastMmap backend
101  
102 =head2 cache_file_directory
103  
104 is=rw
105  
106 Directory to store Cache files in when using File backend
107  
108 =head2 cert_subdomain_is_valid
109  
110 is=rw
111  
112 Should VMCs be valid for any subdomain of their altname
113  
114 =head2 dns_client_timeout
115  
116 is=rw
117  
118 Timeout value for DNS
119  
120 =head2 force_record
121  
122 is=rw
123  
124 Fake record to use
125  
126 =head2 http_client_max_redirect
127  
128 is=rw
129  
130 Maximum redirects to follow for HTTP
131  
132 =head2 http_client_timeout
133  
134 is=rw
135  
136 Timeout value for HTTP
137  
138 =head2 no_experimental_vmc
139  
140 is=rw
141  
142 Disallow VMCs marked as experimental
143  
144 =head2 no_location_with_vmc
145  
146 is=rw
147  
148 Do not check location if VMC was present
149  
150 =head2 no_validate_cert
151  
152 is=rw
153  
154 Do not validate VMC
155  
156 =head2 no_validate_svg
157  
158 is=rw
159  
160 Do not validate SVG
161  
162 =head2 require_dkim
163  
164 is=rw
165  
166 Require DKIM authentication
167  
168 =head2 require_vmc
169  
170 is=rw
171  
172 Require VMC validation
173  
174 =head2 ssl_root_cert
175  
176 is=rw
177  
178 Location of SSL Root Cert Bundle - Defaults to Mozilla::CA bundle plus Known BIMI Root Certs
179  
180 =head2 strict_spf
181  
182 is=rw
183  
184 Disallow SPF +all
185  
186 =head2 svg_from_file
187  
188 is=rw
189  
190 Fake SVG with file contents
191  
192 =head2 svg_max_fetch_size
193  
194 is=rw
195  
196 Maximum fetch size for SVG retrieval
197  
198 =head2 svg_max_size
199  
200 is=rw
201  
202 Maximum valid size for SVG
203  
204 =head2 svg_profile
205  
206 is=rw
207  
208 Profile name to use for SVG validation
209  
210 =head2 verbose
211  
212 is=rw
213  
214 Be More Verbose
215  
216 =head2 vmc_from_file
217  
218 is=rw
219  
220 Fake VMC with file contents
221  
222 =head2 vmc_max_fetch_size
223  
224 is=rw
225  
226 Maximum fetch size for VMC retrieval
227  
228 =head2 vmc_no_check_alt
229  
230 is=rw
231  
232 Do not check the alt name of a VMC
233  
234 =head1 EXTENDS
235  
236 =over 4
237  
238 =item * L<Moose::Object>
239  
240 =back
241  
242 =head1 REQUIRES
243  
244 =over 4
245  
246 =item * L<Mail::BIMI::Prelude|Mail::BIMI::Prelude>
247  
248 =item * L<Moose|Moose>
249  
250 =back
251  
252 =head1 AUTHOR
253  
254 Marc Bradshaw <marc@marcbradshaw.net>
255  
256 =head1 COPYRIGHT AND LICENSE
257  
258 This software is copyright (c) 2020 by Marc Bradshaw.
259  
260 This is free software; you can redistribute it and/or modify it under
261 the same terms as the Perl 5 programming language system itself.
262  
263 =cut
« BIMI/Record/Location.pm ↑ Summary BIMI/Role/HasError.pm »