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 4448 14914 if ($expand{$keyword} and @$types_entry + 1 <= @tokens)
100 4448 19359 if $expanded
102 67113 83773 $expanded ? :
109 350474 494209 if $skip{$i}
110 92 494117 unless defined $types->[$pos]
111 9882 484235 if ($self->_check_for_date($tokens[$i], $i, \$date_index))
114 239 7599 @indexes ? :
8041 476194 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()) { }
5371 470823 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 9898 485304 if ($self->_check_formatted('ymd', \%count)) { }