Branch Coverage

blib/lib/Tie/iCal.pm
Criterion Covered Total %
branch 79 98 80.6


line true false branch
84 0 4 unless tie my @a, 'Tie::File', $f, 'recsep', "\r\n"
98 187 0 defined $index ? :
107 1 3 defined $index ? :
115 4 24 if (substr($line, 0, 3) eq 'UID')
116 4 0 if ($self->unfold($$self{'i'}) =~ /^UID.*:(.*)$/) { }
133 180 4418 if ($line =~ /^UID/)
134 180 0 if ($self->unfold($$self{'i'}) =~ /^UID.*:(.*)$/) { }
151 0 0 if substr($line, 0, 3) eq 'UID'
175 0 48 if ref $c ne 'ARRAY'
188 1 49 defined $index ? :
204 0 5291 if $$self{'debug'}
229 140 101 if (exists $$self{'C'}{$uid})
232 140 0 if ($self->unfold($index) =~ /^UID.*:(.*)$/) { }
233 139 1 if ($1 eq $uid) { }
249 2350 39249 if (substr($line, 0, 3) eq 'UID')
250 2350 0 if ($self->unfold($index) =~ /^UID.*:(.*)$/) { }
252 50 2300 if ($1 eq $uid)
421 36 48 $excludeComponent ? :
422 48 36 unless $excludeComponent
424 3 427 if ($name eq 'RRULE') { }
272 155 elsif (ref \$$e{$name} eq 'SCALAR') { }
155 0 elsif (ref $$e{$name} eq 'ARRAY') { }
425 0 3 if (ref $$e{$name} ne 'HASH') { }
430 3 6 ref ${$$e{$name};}{$k} eq 'ARRAY' ? :
437 36 119 if (@{$$e{$name};} and not grep({ref $_ ne 'HASH';} @{$$e{$name};})) { }
4 115 elsif (@{$$e{$name};} and not grep({ref $_ ne 'ARRAY';} @{$$e{$name};})) { }
445 12 3 if (ref ${$cl;}[0] eq 'HASH') { }
460 48 36 unless $excludeComponent
477 0 5654 unless $line =~ s/^(["]) # a $quote ((?:\\.|(?!\1)[^\\])*) # and $quoted text \1 # followed by the same quote | # --OR-- ^((?:\\.|[^\\"])*?) # an $unquoted text (\Z(?!\n)|(?-x:$delimiter)|(?!^)(?=["])) # plus EOL, delimiter, or quote //sx
486 0 5654 unless defined $quote or length $unquoted or length $delim
489 0 5654 defined $quote ? :
491 2107 3547 if (length $delim)
495 3547 2107 unless (length $line)
516 187 3721 if ${$$self{'A'};}[$i] =~ /^UID/
517 1951 1770 if (${$$self{'A'};}[$i] =~ /^\w+/)
519 281 1670 if ($subComponent ne '') { }
139 1531 elsif ($contentLine =~ /^BEGIN:(\w+)$/) { }
485 1046 elsif ($contentLine =~ /^[\w-]+;.*$/s) { }
1046 0 elsif ($contentLine =~ /^[\w-]+:.*$/s) { }
520 139 142 if $contentLine =~ /^END:$subComponent$/
530 25 460 if (exists $e{$name}) { }
531 9 16 if (not @{$e{$name};} && !grep({ref $_ ne 'ARRAY';} @{$e{$name};})) { }
543 7 1039 if ($name eq 'RRULE') { }
545 7 14 $v =~ /,/ ? :
550 6 1040 if (exists $e{$name}) { }
551 0 6 if (not ref $e{$name} eq 'ARRAY' && @{$e{$name};} && !grep({ref $_ ne 'ARRAY';} @{$e{$name};})) { }
558 0 1040 if (@values == 0) { }
1040 0 elsif (@values == 1) { }
572 139 187 $excludeComponent ? :