Branch Coverage

blib/lib/Convert/ASN1/IO.pm
Criterion Covered Total %
branch 46 94 48.9


line true false branch
12 23 0 if eval { do { require bytes } }
32 0 1 if ($depth)
34 0 0 unless (2 + $pos <= length $buf)
35 0 0 if $n == length $buf
39 0 0 if (substr($buf, $pos, 2) eq "\0\0")
40 0 0 unless (--$depth)
49 0 1 unless ($tb or $pos + $tb < length $buf)
50 0 0 if $n == length $buf
54 0 1 if (unpack("C", substr($buf, $pos + $tb, 1)) == 128)
63 1 0 if ($lb)
64 0 1 if ($depth) { }
75 1 0 if (defined $peer)
76 0 1 if ($len > length $buf) { }
0 1 elsif ($len == 0) { }
79 0 0 unless defined($peer = recv($_[0], $buf, $len, 2))
81 0 0 if ($len > length $buf)
92 0 1 if ($_[2] & 2) { }
0 1 elsif (not defined($peer = recv($_[0], $_[1], $len, 0))) { }
113 0 2 if ($_[2]) { }
114 0 0 if ($_[2] > length $_[1])
137 0 196 unless $e = sysread($_[0], $_[1], $n, length $_[1])
143 175 91 if (($tch & 31) == 31)
148 0 273 unless $e = sysread($_[0], $_[1], $n, length $_[1])
158 0 0 unless $e = sysread($_[0], $_[1], $n, length $_[1])
164 71 195 if ($len & 128) { }
71 124 elsif (not $len || $tch) { }
165 71 0 unless ($len &= 127)
172 0 0 unless $e = sysread($_[0], $_[1], $n, length $_[1])
179 0 71 unless $depth
180 1 70 unless (--$depth)
188 1 193 unless $depth
192 0 1 unless $e = sysread($_[0], $_[1], $n, length $_[1])
198 0 0 defined $e ? :
205 1 0 @_ == 4 ? :
217 0 2 ref $_[0] ? :
220 1 1 unless exists $href->{'asn_buffer'}
224 1 2 if $need
225 1 1 unless my($tb, $tag) = asn_decode_tag($href->{'asn_buffer'})
226 0 1 unless my($lb, $len) = asn_decode_length(substr($href->{'asn_buffer'}, $tb, 8))
230 2 1 if ($need and $need <= length $href->{'asn_buffer'})
236 0 1 $need > 1024 ? :
238 0 1 unless sysread $_[0], $href->{'asn_buffer'}, $get, length $href->{'asn_buffer'}
245 0 2 ref $_[0] ? :
248 0 2 unless exists $href->{'asn_buffer'}
251 0 2 if exists $href->{'asn_need'}
253 1 1 unless my($tb, $tag) = asn_decode_tag($href->{'asn_buffer'})
254 0 1 unless my($lb, $len) = asn_decode_length(substr($href->{'asn_buffer'}, $tb, 8))