line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Email::Sender::Transport 1.500; |
2
|
|
|
|
|
|
|
# ABSTRACT: a role for email transports |
3
|
|
|
|
|
|
|
|
4
|
12
|
|
|
12
|
|
181385
|
use Moo::Role; |
|
12
|
|
|
|
|
43310
|
|
|
12
|
|
|
|
|
75
|
|
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, which it includes. The important |
11
|
|
|
|
|
|
|
#pod difference is that Transports are often intended to be used by |
12
|
|
|
|
|
|
|
#pod L, 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 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 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. |
22
|
|
|
|
|
|
|
#pod |
23
|
|
|
|
|
|
|
#pod It is B 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
|
|
|
|
|
|
|
with 'Email::Sender::Role::CommonSending'; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub is_simple { |
33
|
8
|
|
|
8
|
0
|
73
|
my ($self) = @_; |
34
|
8
|
100
|
|
|
|
43
|
return if $self->allow_partial_success; |
35
|
7
|
|
|
|
|
20
|
return 1; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
0
|
0
|
|
sub allow_partial_success { 0 } |
39
|
|
|
|
|
|
|
|
40
|
12
|
|
|
12
|
|
4933
|
no Moo::Role; |
|
12
|
|
|
|
|
24
|
|
|
12
|
|
|
|
|
66
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |