line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::APNs::Extended::Feedback; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
157516
|
use strict; |
|
2
|
|
|
|
|
17
|
|
|
2
|
|
|
|
|
63
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
81
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.14'; |
6
|
2
|
|
|
2
|
|
884
|
use parent 'Net::APNs::Extended::Base'; |
|
2
|
|
|
|
|
601
|
|
|
2
|
|
|
|
|
11
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my %default = ( |
9
|
|
|
|
|
|
|
host_production => 'feedback.push.apple.com', |
10
|
|
|
|
|
|
|
host_sandbox => 'feedback.sandbox.push.apple.com', |
11
|
|
|
|
|
|
|
is_sandbox => 0, |
12
|
|
|
|
|
|
|
port => 2196, |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
2
|
|
|
2
|
1
|
1235
|
my ($class, %args) = @_; |
17
|
2
|
|
|
|
|
25
|
$class->SUPER::new(%default, %args); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub retrieve_feedback { |
21
|
1
|
|
|
1
|
1
|
1216
|
my $self = shift; |
22
|
1
|
|
|
|
|
4
|
my $data = $self->_read; |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
54
|
my $res = []; |
25
|
1
|
|
|
|
|
6
|
while ($data) { |
26
|
2
|
|
|
|
|
4
|
my ($time_t, $token_bin); |
27
|
2
|
|
|
|
|
9
|
($time_t, $token_bin, $data) = unpack 'N n/a a*', $data; |
28
|
2
|
|
|
|
|
13
|
push @$res, { |
29
|
|
|
|
|
|
|
time_t => $time_t, |
30
|
|
|
|
|
|
|
token_bin => $token_bin, |
31
|
|
|
|
|
|
|
token_hex => unpack 'H*', $token_bin, |
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
|
|
4
|
return $res; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
__END__ |