Branch Coverage

blib/lib/IMAP/BodyStructure.pm
Criterion Covered Total %
branch 68 78 87.1


line true false branch
128 2 0 $self->{'disp'} ? :
200 13 1 if (defined $arg) { }
203 0 1 wantarray ? :
257 17 60 unless @parts
261 33 27 if ($self->type =~ m[^multipart/]) { }
22 5 elsif ($self->type eq 'message/rfc822') { }
262 27 6 if (exists $self->{'parts'}[$part_num - 1]) { }
268 4 18 if $part_num eq 'TEXT'
270 12 6 if ($self->{'bodystructure'}->type =~ m[^ multipart/ | ^ message/rfc822 \z]msx) { }
273 5 1 $part_num == 1 ? :
278 3 2 if ($part_num and $part_num ne '1' or @parts) { }
347 53 13 $id ? :
349 13 53 unless $$str =~ /\G\s*(?:\(BODYSTRUCTURE\s*)?\(/cg
353 13 40 if ($$str =~ /\G(?=\()/cg) { }
375 7 33 if ($bs->{'type'} eq 'message/rfc822') { }
23 10 elsif ($bs->{'type'} =~ m[^text/]) { }
377 1 6 if ($id_prefix =~ s/\.?TEXT//) { }
403 23 30 if ($$str =~ /\GNIL/cg) { }
30 0 elsif ($$str =~ /\G\s*\(/cg) { }
423 27 56 if ($$str =~ /\GNIL/cg) { }
56 0 elsif ($$str =~ /\G\s*\(/cg) { }
429 56 58 unless $key
458 206 585 if ($$str =~ /\GNIL/cg) { }
343 242 elsif ($$str =~ /\G(\"(?>[^\\\"]*(?:\\.[^\\\"]*)*)\")/cg) { }
5 237 elsif ($$str =~ /\G\{(\d+)\}\r\n/cg) { }
71 166 elsif ($$str =~ /\G([^"\(\)\{ \%\*\"\\\x00-\x1F]+)/cg) { }
479 1 52 if ($$str =~ /\G\s*\(/cg)
483 1 2 unless $data
492 1 51 if (my $data = &_get_nstring(\$$str))
619 0 7 unless $$str =~ /\G\s*(?:\(ENVELOPE)?\s*\(/cg
642 0 32 if ($$str =~ /\GNIL/cg) { }
16 16 elsif ($$str =~ /\G\s*\(/cg) { }
652 16 0 $addr{'account'} ? :
668 26 16 if ($$str =~ /\GNIL/cg) { }
16 0 elsif ($$str =~ /\G\s*\(/cg) { }
689 13 3 if (defined $phrase and $phrase ne '') { }
690 13 0 unless ($phrase =~ /^ \s* " [^"]+ " \s* \z/msx)
695 3 10 unless ($phrase =~ /^ \s* $rfc2822_atom (?: \s+ $rfc2822_atom)* \s* \z/msx)
700 13 0 $email ? :