Branch Coverage

blib/lib/DateTime/Format/Natural/Extract.pm
Criterion Covered Total %
branch 54 56 96.4


line true false branch
68 97 112 if ($extract_string =~ /\s+ $timespan_sep \s+/xi)
83 759 1085 if $skip{$i}
84 16 1069 if ($self->_check_for_date($tokens[$i], $i, \$date_index))
93 4457 14882 if ($expand{$keyword} and @$types_entry + 1 <= @tokens)
100 4457 19336 if $expanded
102 67245 83546 $expanded ? :
109 350779 493242 if $skip{$i}
110 92 493150 unless defined $types->[$pos]
111 9875 483275 if ($self->_check_for_date($tokens[$i], $i, \$date_index))
114 241 7594 @indexes ? :
8046 475229 if ($types->[$pos] eq 'SCALAR' and defined $definition->{$pos} and $tokens[$i] =~ /^$definition->{$pos}$/i or $types->[$pos] eq 'REGEXP' and $tokens[$i] =~ /$definition->{$pos}/ and @indexes ? $i - $indexes[-1] == 1 : &true()) { }
5391 469838 elsif ($matched) { }
126 12 214 defined $date_index ? :
223 3 if ($matched and @indexes == $length and defined $date_index ? $indexes[0] - $date_index == 1 : &true())
130 9 214 defined $date_index ? :
131 9 214 defined $date_index ? :
132 6 217 $grammar_durations{$keyword} ? :
134 9 214 defined $date_index ? :
141 7 432 if (defined $date_index and not $seen_expression)
159 97 0 if (@strings)
170 68 111 unless &$extract_duration($skip, \@indexes, $i)
174 63 143 if ($self->$extract(&$get_range(\@strings, $i), &$get_range(\@indexes, $i), $tokens, \@chunks))
179 63 48 if ($save_expression)
210 224 69 if ($expression->[2]{'flags'} & 1 or $expression->[2]{'flags'} & 2) { }
69 0 elsif ($expression->[2]{'flags'} & 4) { }
213 31 193 if (not $seen_duration and defined $tokens->[$next] and $tokens->[$next] =~ /^$timespan_sep$/i and defined $expressions[$i + 1] and $expressions[$i + 1][2]{'flags'} & 1 || $expressions[$i + 1][2]{'flags'} & 2 and $expressions[$i + 1][0][0] - $next == 1) { }
31 162 elsif ($seen_duration) { }
251 9891 484344 if ($self->_check_formatted('ymd', \%count)) { }