Branch Coverage

blib/lib/Crypt/OpenPGP/PacketFactory.pm
Criterion Covered Total %
branch 45 66 68.1


line true false branch
38 83 229 unless $buf and $buf->offset < $buf->length
40 52 177 if ($find) { }
41 52 0 ref $find eq 'ARRAY' ? :
47 48 181 if ($parse) { }
48 48 0 ref $parse eq 'ARRAY' ? :
58 384 8 $len ? :
59 8 384 unless $type
70 215 6 if ($parse{$type} and my $ref = $Crypt::OpenPGP::PacketFactory::PACKET_TYPES{$type}) { }
72 60 155 $ref->{'args'} ? :
74 0 215 if $@
87 8 384 unless $buf and $buf->offset < $buf->length
91 0 384 unless $tag & 128
95 133 251 if ($is_new) { }
101 0 251 ($tag & 3) == 3 ? :
114 0 133 unless $buf and $buf->offset < $buf->length
117 133 0 if ($lb1 <= 191) { }
0 0 elsif ($lb1 <= 223) { }
0 0 elsif ($lb1 < 255) { }
138 25 69 $obj->can('pkt_type') ? :
139 11 83 $obj->can('pkt_hdrlen') ? :
141 2 92 if ($obj->{'is_new'} or $type > 15) { }
144 0 2 unless $len
146 2 0 if ($len < 192) { }
0 0 elsif ($len < 8384) { }
158 81 11 unless ($hdrlen)
159 0 81 if (not defined $len) { }
66 15 elsif ($len < 256) { }
15 0 elsif ($len < 65536) { }
169 0 92 if $hdrlen == 1 and $len > 255
171 0 92 if $hdrlen == 2 and $len > 65535
173 0 92 if ($hdrlen == 0) { }
66 26 elsif ($hdrlen == 1) { }
26 0 elsif ($hdrlen == 2) { }