Condition Coverage

blib/lib/DateTime/Format/Natural/Extract.pm
Criterion Covered Total %
condition 48 51 94.1


and 3 conditions

line !l l&&!r l&&r condition
93 13961 921 4457 $expand{$keyword} and @$types_entry + 1 <= @tokens
114 451650 0 31625 $types->[$pos] eq "SCALAR" and defined $definition->{$pos}
451650 31414 211 $types->[$pos] eq "SCALAR" and defined $definition->{$pos} and $tokens[$i] =~ /^$definition->{$pos}$/i
31414 443815 7835 $types->[$pos] eq "REGEXP" and $tokens[$i] =~ /$definition->{$pos}/
475229 0 7835 $types->[$pos] eq "REGEXP" and $tokens[$i] =~ /$definition->{$pos}/ and @indexes ? $i - $indexes[-1] == 1 : &true()
126 143053 7512 226 $matched and @indexes == $length
150565 3 223 $matched and @indexes == $length and defined $date_index ? $indexes[0] - $date_index == 1 : &true()
141 423 9 7 defined $date_index and not $seen_expression
166 97 111 114 defined $tokens->[$index] and $tokens->[$index] =~ /^$timespan_sep$/i
213 31 106 87 not $seen_duration and defined $tokens->[$next]
137 47 40 not $seen_duration and defined $tokens->[$next] and $tokens->[$next] =~ /^$timespan_sep$/i
153 1 39 not $seen_duration and defined $tokens->[$next] and $tokens->[$next] =~ /^$timespan_sep$/i and defined $expressions[$i + 1]
48 5 34 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
5 3 31 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

or 3 conditions

line l !l&&r !l&&!r condition
114 211 7835 475229 $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()
210 7 217 69 $expression->[2]{'flags'} & 1 or $expression->[2]{'flags'} & 2
213 0 34 5 $expressions[$i + 1][2]{'flags'} & 1 || $expressions[$i + 1][2]{'flags'} & 2