Branch Coverage

blib/lib/Crypt/OpenPGP/PacketFactory.pm
Criterion Covered Total %
branch 46 66 69.7


line true false branch
41 94 358 unless $buf and $buf->offset < $buf->length
43 90 268 if ($find) { }
44 90 0 ref $find eq 'ARRAY' ? :
50 86 272 if ($parse) { }
51 86 0 ref $parse eq 'ARRAY' ? :
61 836 13 $len ? :
62 11 838 unless $type
73 341 6 if ($parse{$type} and my $ref = $PACKET_TYPES{$type}) { }
75 104 237 $ref->{'args'} ? :
77 0 341 if $@
90 11 838 unless $buf and $buf->offset < $buf->length
94 0 838 unless $tag & 128
98 129 709 if ($is_new) { }
104 2 707 ($tag & 3) == 3 ? :
117 0 129 unless $buf and $buf->offset < $buf->length
120 129 0 if ($lb1 <= 191) { }
0 0 elsif ($lb1 <= 223) { }
0 0 elsif ($lb1 < 255) { }
141 26 69 $obj->can('pkt_type') ? :
142 13 82 $obj->can('pkt_hdrlen') ? :
144 3 92 if ($obj->{'is_new'} or $type > 15) { }
147 0 3 unless $len
149 3 0 if ($len < 192) { }
0 0 elsif ($len < 8384) { }
161 79 13 unless ($hdrlen)
162 0 79 if (not defined $len) { }
64 15 elsif ($len < 256) { }
15 0 elsif ($len < 65536) { }
172 0 92 if $hdrlen == 1 and $len > 255
174 0 92 if $hdrlen == 2 and $len > 65535
176 0 92 if ($hdrlen == 0) { }
64 28 elsif ($hdrlen == 1) { }
28 0 elsif ($hdrlen == 2) { }