blib/lib/Email/Sender/Transport.pm

filter: Statementstmt 91.6% 11 / 12 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 2 totaltotal 80.0% 16 / 20 CC 2 SCAR 4.7
CC
2
Cov
93%
is_simple
2.0
allow_partial_success
2.0
BEGIN
1.0
CRAP 1.6
« blib/lib/Email/Sender/Transport/Print.pm ↑ Summary blib/lib/Email/Sender/Transport/DevNull.pm »
1 package Email::Sender::Transport 2.603;
2 # ABSTRACT: a role for email transports
3  
4 13 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 #pod =head1 DESCRIPTION
7 #pod
8 #pod Email::Sender::Transport is a Moo role to aid in writing classes used to send
9 #pod mail. For the most part, its behavior comes entirely from the role
10 #pod L<Email::Sender::Role::CommonSending>, which it includes. The important
11 #pod difference is that Transports are often intended to be used by
12 #pod L<Email::Sender::Simple>, and they provide two methods related to that purpose.
13 #pod
14 #pod =for Pod::Coverage is_simple allow_partial_success
15 #pod
16 #pod First, they provide an C<allow_partial_success> method which returns true or
17 #pod false to indicate whether the transport will ever signal partial success.
18 #pod
19 #pod Second, they provide an C<is_simple> method, which returns true if the
20 #pod transport is suitable for use with Email::Sender::Simple. By default, this
21 #pod method returns the inverse of C<allow_partial_success>.
22 #pod
23 #pod It is B<imperative> that these methods be accurate to prevent
24 #pod Email::Sender::Simple users from sending partially successful transmissions.
25 #pod Partial success is a complex case that almost all users will wish to avoid at
26 #pod all times.
27 #pod
28 #pod =cut
29  
30 13 with 'Email::Sender::Role::CommonSending';
31  
32 8 ▶sub is_simple {
Subroutine is_simple: called CC=2 SCAR=6.9
Pod undocumented
33 8 my ($self) = @_;
34 8 ▶ return if $self->allow_partial_success;
Branch: 1 branch
BranchTrueFalseTotal
if $self->allow_partial_success 1 7 8
35 7 return 1;
36 }
37  
38 0 ▶sub allow_partial_success { 0 }
Subroutine allow_partial_success: not called CC=1 SCAR=6.9
Pod undocumented
39  
40 13 ▶no Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
41 13 1;
42  
43 __END__
« blib/lib/Email/Sender/Transport/Print.pm ↑ Summary blib/lib/Email/Sender/Transport/DevNull.pm »