| 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
| |||||||||||
| 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__ | ||||||||||