line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
36
|
|
|
36
|
|
223
|
use warnings; |
|
36
|
|
|
|
|
71
|
|
|
36
|
|
|
|
|
930
|
|
4
|
36
|
|
|
36
|
|
166
|
use Carp qw{ carp croak }; |
|
36
|
|
|
|
|
67
|
|
|
36
|
|
|
|
|
825
|
|
5
|
36
|
|
|
36
|
|
191
|
|
|
36
|
|
|
|
|
108
|
|
|
36
|
|
|
|
|
21305
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.47; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my ( $class, %params ) = @_; |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
0
|
|
|
die "Missing module" unless $params{module}; |
12
|
|
|
|
|
|
|
die "Missing wrapper" unless $params{wrapper}; |
13
|
0
|
0
|
|
|
|
|
die "Missing id" unless $params{id}; |
14
|
0
|
0
|
|
|
|
|
die "Missing domain" unless $params{domain}; |
15
|
0
|
0
|
|
|
|
|
|
16
|
0
|
0
|
|
|
|
|
my $module = $params{module}; |
17
|
|
|
|
|
|
|
my $api_wrapper = $params{wrapper}; |
18
|
0
|
|
|
|
|
|
my $id = $params{id}; |
19
|
0
|
|
|
|
|
|
my $domain = $params{domain}; |
20
|
0
|
|
|
|
|
|
my $domain_name = $domain->name; |
21
|
0
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $response = $api_wrapper->rawCall( method => 'get', path => "/email/domain/$domain_name/task/redirection/$id", noSignature => 0 ); |
23
|
|
|
|
|
|
|
carp $response->error if $response->error; |
24
|
0
|
|
|
|
|
|
|
25
|
0
|
0
|
|
|
|
|
if ( !$response->error ) { |
26
|
|
|
|
|
|
|
|
27
|
0
|
0
|
|
|
|
|
my $porperties = $response->content; |
28
|
|
|
|
|
|
|
my $self = bless { _module => $module, _valid => 1, _wrapper => $api_wrapper, _id => $id, _properties => $porperties, _domain => $domain }, $class; |
29
|
0
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $self; |
31
|
|
|
|
|
|
|
} else { |
32
|
0
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
return undef; |
34
|
|
|
|
|
|
|
} |
35
|
0
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my ($self) = @_; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
$self->properties; |
41
|
0
|
|
|
0
|
0
|
|
|
42
|
|
|
|
|
|
|
return $self->{_valid},; |
43
|
0
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
my ($self) = @_; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
croak "Invalid" unless $self->{_valid}; |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
0
|
0
|
|
my $domain_name = $self->{_domain}->name; |
51
|
|
|
|
|
|
|
my $id = $self->{_id}; |
52
|
0
|
0
|
|
|
|
|
my $api_wrapper = $self->{_wrapper}; |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
my $response = $api_wrapper->rawCall( method => 'get', path => "/email/domain/$domain_name/task/redirection/$id", noSignature => 0 ); |
55
|
0
|
|
|
|
|
|
carp $response->error if $response->error; |
56
|
0
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
if ( !$response->error ) { |
58
|
0
|
|
|
|
|
|
|
59
|
0
|
0
|
|
|
|
|
my $porperties = $response->content; |
60
|
|
|
|
|
|
|
|
61
|
0
|
0
|
|
|
|
|
} else { |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
$self->{_valid} = 0; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
} |
67
|
0
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
my ($self) = @_; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
72
|
|
|
|
|
|
|
return unless $self->{_valid}; |
73
|
|
|
|
|
|
|
|
74
|
0
|
|
|
0
|
0
|
|
return $self->{_properties}{account}; |
75
|
|
|
|
|
|
|
} |
76
|
0
|
0
|
|
|
|
|
|
77
|
0
|
0
|
|
|
|
|
|
78
|
|
|
|
|
|
|
my ($self) = @_; |
79
|
0
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
$self->properties unless $self->{_properties}; |
81
|
|
|
|
|
|
|
return unless $self->{_valid}; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
return $self->{_properties}{type}; |
84
|
0
|
|
|
0
|
0
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
0
|
0
|
|
|
|
|
|
87
|
0
|
0
|
|
|
|
|
my ($self) = @_; |
88
|
|
|
|
|
|
|
|
89
|
0
|
|
|
|
|
|
return $self->{_id}; |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
my ($self) = @_; |
94
|
0
|
|
|
0
|
0
|
|
|
95
|
|
|
|
|
|
|
return $self->{_domain}; |
96
|
0
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
my ($self) = @_; |
100
|
|
|
|
|
|
|
|
101
|
0
|
|
|
0
|
0
|
|
$self->properties unless $self->{_properties}; |
102
|
|
|
|
|
|
|
return unless $self->{_valid}; |
103
|
0
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
return $self->{_properties}{date}; |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
109
|
|
|
|
|
|
|
|
110
|
0
|
0
|
|
|
|
|
$self->properties unless $self->{_properties}; |
111
|
0
|
0
|
|
|
|
|
return unless $self->{_valid}; |
112
|
|
|
|
|
|
|
|
113
|
0
|
|
|
|
|
|
return $self->{_properties}{action}; |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
1; |