Branch Coverage

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


line true false branch
45 1 8 unless exists $args{'cert_file'} or exists $args{'cert'}
47 1 4 if exists $args{'cert_file'} and exists $args{'cert'}
49 1 3 if exists $args{'key_file'} and exists $args{'key'}
61 1 1 $self->is_sandbox ? :
68 0 0 if $sock and $ctx and $ssl
81 0 0 unless socket my $sock, 2, 1, 0
83 0 0 unless my $iaddr = inet_aton($self->hostname)
85 0 0 unless pack_sockaddr_in($self->port, $iaddr)
87 0 0 unless connect $sock, $sock_addr
95 0 0 unless my $ctx = &Net::SSLeay::CTX_new()
100 0 0 ref $pw ? :
111 0 0 unless &Net::SSLeay::connect($ssl)
120 0 0 unless defined $cert_file
125 0 0 if (exists $self->{'key_file'} or exists $self->{'key'}) { }
127 0 0 unless defined $key_file
139 11 0 unless @$connection
142 0 0 if ($sock)
143 0 0 unless (defined shutdown($sock, 1))
147 0 0 if ($ssl)
151 0 0 if ($ctx)
155 0 0 if ($sock)
156 0 0 unless close $sock
169 0 0 unless $self->_do_select($sock, 'write', $self->write_timeout)
171 0 0 unless Net::SSLeay::ssl_write_all($ssl, $data)
179 0 0 unless $self->_do_select($sock, 'read', $self->read_timeout)
181 0 0 unless my $data = Net::SSLeay::ssl_read_all($ssl)
193 0 0 if ($act eq 'read') { }
199 0 0 unless $nfound
202 0 0 if ($nfound == -1)
203 0 0 if ($! == 4) { }
205 0 0 if defined $timeout
241 0 0 if $err