Branch Coverage

blib/lib/IMAP/BodyStructure.pm
Criterion Covered Total %
branch 62 72 86.1


line true false branch
129 2 0 $$self{'disp'} ? :
201 13 1 if (defined $arg) { }
204 0 1 wantarray ? :
258 17 60 unless @parts
262 33 27 if ($self->type =~ m[^multipart/]) { }
22 5 elsif ($self->type eq 'message/rfc822') { }
263 27 6 if (exists $$self{'parts'}[$part_num - 1]) { }
269 4 18 if $part_num eq 'TEXT'
271 12 6 if ($$self{'bodystructure'}->type =~ m[^ multipart/ | ^ message/rfc822 \z]msx) { }
274 5 1 $part_num == 1 ? :
279 3 2 if ($part_num and $part_num ne '1' or @parts) { }
348 53 13 $id ? :
350 13 53 unless $$str =~ /\G\s*(?:\(BODYSTRUCTURE\s*)?\(/cg
354 13 40 if ($$str =~ /\G(?=\()/cg) { }
376 7 33 if ($$bs{'type'} eq 'message/rfc822') { }
23 10 elsif ($$bs{'type'} =~ m[^text/]) { }
378 1 6 if ($id_prefix =~ s/\.?TEXT//) { }
404 23 30 if ($$str =~ /\GNIL/cg) { }
30 0 elsif ($$str =~ /\G\s*\(/cg) { }
424 27 56 if ($$str =~ /\GNIL/cg) { }
56 0 elsif ($$str =~ /\G\s*\(/cg) { }
430 56 58 unless $key
459 208 581 if ($$str =~ /\GNIL/cg) { }
340 241 elsif ($$str =~ /\G(\"(?>[^\\\"]*(?:\\.[^\\\"]*)*)\")/cg) { }
5 236 elsif ($$str =~ /\G\{(\d+)\}\r\n/cg) { }
71 165 elsif ($$str =~ /\G([^"\(\)\{ \%\*\"\\\x00-\x1F]+)/cg) { }
595 0 7 unless $$str =~ /\G\s*(?:\(ENVELOPE)?\s*\(/cg
618 0 32 if ($$str =~ /\GNIL/cg) { }
16 16 elsif ($$str =~ /\G\s*\(/cg) { }
627 16 0 $addr{'account'} ? :
644 26 16 if ($$str =~ /\GNIL/cg) { }
16 0 elsif ($$str =~ /\G\s*\(/cg) { }
665 13 3 if (defined $phrase and $phrase ne '') { }
666 13 0 unless ($phrase =~ /^ \s* " [^"]+ " \s* \z/msx)
671 3 10 unless ($phrase =~ /^ \s* $rfc2822_atom (?: \s+ $rfc2822_atom)* \s* \z/msx)
676 13 0 $email ? :