| 1 | package Net::APNs::Extended::Feedback; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use parent 'Net::APNs::Extended::Base'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 2 | my %default = ( | |||||||||
| 8 | host_production => 'feedback.push.apple.com', | ||||||||||
| 9 | host_sandbox => 'feedback.sandbox.push.apple.com', | ||||||||||
| 10 | is_sandbox => 0, | ||||||||||
| 11 | port => 2196, | ||||||||||
| 12 | ); | ||||||||||
| 13 | |||||||||||
| 14 | sub new { | ||||||||||
| 15 | 2 | ▶ | my ($class, %args) = @_; | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 16 | 2 | $class->SUPER::new(%default, %args); | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | sub retrieve_feedback { | ||||||||||
| 20 | 1 | ▶ | my $self = shift; | ||||||||
|
Subroutine
retrieve_feedback: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 21 | 1 | my $data = $self->_read; | |||||||||
| 22 | |||||||||||
| 23 | 1 | my $res = []; | |||||||||
| 24 | 1 | ▶ | while ($data) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | 2 | my ($time_t, $token_bin); | |||||||||
| 26 | 2 | ($time_t, $token_bin, $data) = unpack 'N n/a a*', $data; | |||||||||
| 27 | 2 | push @$res, { | |||||||||
| 28 | time_t => $time_t, | ||||||||||
| 29 | token_bin => $token_bin, | ||||||||||
| 30 | token_hex => unpack 'H*', $token_bin, | ||||||||||
| 31 | }; | ||||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 1 | return $res; | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | 2 | 1; | |||||||||
| 38 | __END__ | ||||||||||