line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Email::Sender::Transport::Wrapper 2.600; |
2
|
|
|
|
|
|
|
# ABSTRACT: a mailer to wrap a mailer for mailing mail |
3
|
|
|
|
|
|
|
|
4
|
3
|
|
|
3
|
|
2547
|
use Moo; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
13
|
|
5
|
|
|
|
|
|
|
with 'Email::Sender::Transport'; |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
1071
|
use Email::Sender::Util; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
784
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#pod =head1 DESCRIPTION |
10
|
|
|
|
|
|
|
#pod |
11
|
|
|
|
|
|
|
#pod Email::Sender::Transport::Wrapper wraps a transport, provided as the |
12
|
|
|
|
|
|
|
#pod C argument to the constructor. It is provided as a simple way to |
13
|
|
|
|
|
|
|
#pod use method modifiers to create wrapping classes. |
14
|
|
|
|
|
|
|
#pod |
15
|
|
|
|
|
|
|
#pod =cut |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has transport => ( |
18
|
|
|
|
|
|
|
is => 'ro', |
19
|
|
|
|
|
|
|
does => 'Email::Sender::Transport', |
20
|
|
|
|
|
|
|
required => 1, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub send_email { |
24
|
2
|
|
|
2
|
0
|
110
|
my $self = shift; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
13
|
$self->transport->send_email(@_); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub is_simple { |
30
|
2
|
|
|
2
|
0
|
13
|
return $_[0]->transport->is_simple; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub allow_partial_success { |
34
|
0
|
|
|
0
|
0
|
0
|
return $_[0]->transport->allow_partial_success; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub BUILDARGS { |
38
|
2
|
|
|
2
|
0
|
2567
|
my $self = shift; |
39
|
2
|
|
|
|
|
14
|
my $href = $self->SUPER::BUILDARGS(@_); |
40
|
|
|
|
|
|
|
|
41
|
2
|
100
|
|
|
|
25
|
if (my $class = delete $href->{transport_class}) { |
42
|
|
|
|
|
|
|
Carp::confess("given both a transport and transport_class") |
43
|
1
|
50
|
|
|
|
3
|
if $href->{transport}; |
44
|
|
|
|
|
|
|
|
45
|
1
|
|
|
|
|
2
|
my %arg; |
46
|
1
|
50
|
|
|
|
3
|
for my $key (map {; /^transport_arg_(.+)$/ ? "$1" : () } keys %$href) { |
|
1
|
|
|
|
|
5
|
|
47
|
0
|
|
|
|
|
0
|
$arg{$key} = delete $href->{"transport_arg_$key"}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
1
|
|
|
|
|
5
|
$href->{transport} = Email::Sender::Util->easy_transport($class, \%arg); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
2
|
|
|
|
|
61
|
return $href; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
3
|
|
|
3
|
|
19
|
no Moo; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
20
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |