| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Email::Sender::Failure::Multi 2.600; |
|
2
|
|
|
|
|
|
|
# ABSTRACT: an aggregate of multiple failures |
|
3
|
|
|
|
|
|
|
|
|
4
|
6
|
|
|
6
|
|
376
|
use Moo; |
|
|
6
|
|
|
|
|
11
|
|
|
|
6
|
|
|
|
|
28
|
|
|
5
|
|
|
|
|
|
|
extends 'Email::Sender::Failure'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
1919
|
use MooX::Types::MooseLike::Base qw(ArrayRef); |
|
|
6
|
|
|
|
|
5814
|
|
|
|
6
|
|
|
|
|
1782
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#pod =head1 DESCRIPTION |
|
10
|
|
|
|
|
|
|
#pod |
|
11
|
|
|
|
|
|
|
#pod A multiple failure report is raised when more than one failure is encountered |
|
12
|
|
|
|
|
|
|
#pod when sending a single message, or when mixed states were encountered. |
|
13
|
|
|
|
|
|
|
#pod |
|
14
|
|
|
|
|
|
|
#pod =attr failures |
|
15
|
|
|
|
|
|
|
#pod |
|
16
|
|
|
|
|
|
|
#pod This method returns a list of other Email::Sender::Failure objects represented |
|
17
|
|
|
|
|
|
|
#pod by this multi. |
|
18
|
|
|
|
|
|
|
#pod |
|
19
|
|
|
|
|
|
|
#pod =cut |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has failures => ( |
|
22
|
|
|
|
|
|
|
is => 'ro', |
|
23
|
|
|
|
|
|
|
isa => ArrayRef, |
|
24
|
|
|
|
|
|
|
required => 1, |
|
25
|
|
|
|
|
|
|
reader => '__get_failures', |
|
26
|
|
|
|
|
|
|
); |
|
27
|
|
|
|
|
|
|
|
|
28
|
9
|
|
|
9
|
|
10
|
sub __failures { @{$_[0]->__get_failures} } |
|
|
9
|
|
|
|
|
31
|
|
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub failures { |
|
31
|
9
|
|
|
9
|
1
|
517
|
my ($self) = @_; |
|
32
|
9
|
50
|
|
|
|
31
|
return $self->__failures if wantarray; |
|
33
|
0
|
0
|
|
|
|
0
|
return if ! defined wantarray; |
|
34
|
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
0
|
Carp::carp("failures in scalar context is deprecated and WILL BE REMOVED"); |
|
36
|
0
|
|
|
|
|
0
|
return $self->__get_failures; |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub recipients { |
|
40
|
3
|
|
|
3
|
1
|
931
|
my ($self) = @_; |
|
41
|
3
|
|
|
|
|
6
|
my @rcpts = map { $_->recipients } $self->failures; |
|
|
3
|
|
|
|
|
12
|
|
|
42
|
|
|
|
|
|
|
|
|
43
|
3
|
50
|
|
|
|
20
|
return @rcpts if wantarray; |
|
44
|
0
|
0
|
|
|
|
0
|
return if ! defined wantarray; |
|
45
|
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
0
|
Carp::carp("recipients in scalar context is deprecated and WILL BE REMOVED"); |
|
47
|
0
|
|
|
|
|
0
|
return \@rcpts; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
#pod =method isa |
|
51
|
|
|
|
|
|
|
#pod |
|
52
|
|
|
|
|
|
|
#pod A multiple failure will report that it is a Permanent or Temporary if all of |
|
53
|
|
|
|
|
|
|
#pod its contained failures are failures of that type. |
|
54
|
|
|
|
|
|
|
#pod |
|
55
|
|
|
|
|
|
|
#pod =cut |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub isa { |
|
58
|
29
|
|
|
29
|
1
|
7164
|
my ($self, $class) = @_; |
|
59
|
|
|
|
|
|
|
|
|
60
|
29
|
100
|
100
|
|
|
135
|
if ( |
|
61
|
|
|
|
|
|
|
$class eq 'Email::Sender::Failure::Permanent' |
|
62
|
|
|
|
|
|
|
or |
|
63
|
|
|
|
|
|
|
$class eq 'Email::Sender::Failure::Temporary' |
|
64
|
|
|
|
|
|
|
) { |
|
65
|
4
|
|
|
|
|
9
|
my @failures = $self->failures; |
|
66
|
4
|
100
|
|
|
|
7
|
return 1 if @failures == grep { $_->isa($class) } @failures; |
|
|
6
|
|
|
|
|
40
|
|
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
|
|
69
|
26
|
|
|
|
|
143
|
return $self->SUPER::isa($class); |
|
70
|
|
|
|
|
|
|
} |
|
71
|
|
|
|
|
|
|
|
|
72
|
6
|
|
|
6
|
|
49
|
no Moo; |
|
|
6
|
|
|
|
|
13
|
|
|
|
6
|
|
|
|
|
25
|
|
|
73
|
|
|
|
|
|
|
1; |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
__END__ |