Branch Coverage

blib/lib/Net/APNs/Extended/Base.pm
Criterion Covered Total %
branch 9 64 14.0


line true false branch
43 1 13 unless exists $args{'cert_file'} or exists $args{'cert'}
45 1 12 if exists $args{'cert_file'} and exists $args{'cert'}
47 1 11 if exists $args{'key_file'} and exists $args{'key'}
60 1 1 $self->is_sandbox ? :
67 0 0 if $sock and $ctx and $ssl
80 0 0 unless socket my $sock, 2, 1, 0
82 0 0 unless my $iaddr = inet_aton($self->hostname)
84 0 0 unless pack_sockaddr_in($self->port, $iaddr)
86 0 0 unless connect $sock, $sock_addr
94 0 0 unless my $ctx = &Net::SSLeay::CTX_tlsv1_new()
99 0 0 ref $pw ? :
110 0 0 unless &Net::SSLeay::connect($ssl)
119 0 0 unless defined $cert_file
124 0 0 if (exists $$self{'key_file'} or exists $$self{'key'}) { }
126 0 0 unless defined $key_file
138 11 0 unless @$connection
141 0 0 if ($sock)
142 0 0 unless (defined shutdown($sock, 1))
146 0 0 if ($ssl)
150 0 0 if ($ctx)
154 0 0 if ($sock)
155 0 0 unless close $sock
168 0 0 unless $self->_do_select($sock, 'write', $self->write_timeout)
170 0 0 unless Net::SSLeay::ssl_write_all($ssl, $data)
178 0 0 unless $self->_do_select($sock, 'read', $self->read_timeout)
180 0 0 unless my $data = Net::SSLeay::ssl_read_all($ssl)
192 0 0 if ($act eq 'read') { }
198 0 0 unless $nfound
201 0 0 if ($nfound == -1)
202 0 0 if ($! == 4) { }
204 0 0 if defined $timeout
240 0 0 if $err