Condition Coverage

blib/lib/Date/Reformat.pm
Criterion Covered Total %
condition 83 142 58.4


and 3 conditions

line !l l&&!r l&&r condition
534 9 2 0 defined $date{'hour_12'} and $date{'hour_12'} > 12 || $date{'hour_12'} == 0
703 46 0 21 $date_parts[0] =~ /^$$TOKENS{'year'}{'regex'}$/ and scalar keys %$date == 0
30 16 0 $hint eq 'dmy' and $date_parts[0] =~ /^$$TOKENS{'month_abbr'}{'regex'}$/ || $date_parts[0] =~ /^$$TOKENS{'month_name'}{'regex'}$/
27 17 0 $hint eq 'mdy' and $date_parts[1] =~ /^$$TOKENS{'month_abbr'}{'regex'}$/ || $date_parts[1] =~ /^$$TOKENS{'month_name'}{'regex'}$/
757 12 5 42 $date_parts[$index] =~ /^$$TOKENS{'month'}{'regex'}$/ and $date_parts[$index] <= 12
803 119 0 3 length $part == 3 and defined $$date{'year'}
995 95 0 1 defined $$date{'am_or_pm'} and lc $$date{'am_or_pm'} eq 'pm'
996 0 0 1 defined $$date{'hour'} and $$date{'hour'} < 12
1298 0 0 6 defined $$date{$source_token} and defined $$transformations{$target_token}{$source_token}

or 2 conditions

line l !l condition
485 2 159 $args // {}
494 145 16 $value // 0
901 0 15 $order_string ||= 'ymd'
1037 7 0 $$definition{'structure'} // 'arrayref'
1038 7 0 $$definition{'params'} // die("Unable to create $structure formatter: No 'params' argument defined.")
1043 0 0 (($$date{$_} // $self->transform_token_value('target_token', $_, 'date', $date)) // $$self{'defaults'}{$_}) // ''
1076 3 0 $$definition{'structure'} // 'hashref'
1077 3 0 $$definition{'params'} // die("Unable to create $structure formatter: No 'params' argument defined.")
1105 1 0 $$definition{'coderef'} // sub { @_; }
1106 1 0 $$definition{'params'} // die(q[Unable to create coderef formatter: No 'params' argument defined.])
1129 13 0 $$definition{'params'} // die(q[Unable to create sprintf formatter: No 'params' argument defined.])
1134 8 0 (($$date{$_} // $self->transform_token_value('target_token', $_, 'date', $date)) // $$self{'defaults'}{$_}) // ''
1192 52 0 $$TOKENS{$internal}{'sprintf'} // die("Unable to find sprintf definition for token '${internal}'")
1315 148 0 $args{'already_claimed'} // {}
1316 148 0 $args{'possible_tokens'} // (return)
1317 117 31 $args{'heuristic'} // ''
1318 148 0 $args{'value'} // (return)

or 3 conditions

line l !l&&r !l&&!r condition
534 0 0 2 $date{'hour_12'} > 12 || $date{'hour_12'} == 0
703 2 0 14 $date_parts[0] =~ /^$$TOKENS{'month_abbr'}{'regex'}$/ || $date_parts[0] =~ /^$$TOKENS{'month_name'}{'regex'}$/
3 0 14 $date_parts[1] =~ /^$$TOKENS{'month_abbr'}{'regex'}$/ || $date_parts[1] =~ /^$$TOKENS{'month_name'}{'regex'}$/
779 7 7 46 not $date_parts[$index] =~ /^$$TOKENS{'day'}{'regex'}$/ or $date_parts[$index] > 31
859 0 2 27 defined $$date{'year'} or defined $$date{'year_abbr'}
881 0 27 0 $order_string // $hint
892 12 0 15 defined $$date{'day'} or defined $$date{'month'}
0 0 15 defined $$date{'day'} or defined $$date{'month'} or defined $$date{'month_abbr'}
0 0 15 defined $$date{'day'} or defined $$date{'month'} or defined $$date{'month_abbr'} or defined $$date{'month_name'}
907 18 72 0 $order_string // $hint
18 49 0 $order_string // $hint
18 25 0 $order_string // $hint
908 0 23 0 $order_string // $hint
916 0 19 0 $order_string // $hint
921 0 24 0 $order_string // $hint
929 0 20 0 $order_string // $hint
934 18 25 0 $order_string // $hint
942 18 21 0 $order_string // $hint
961 5 19 5 $token eq 'month_name' or $token eq 'month_abbr'
964 3 3 0 $order_string // $hint
1043 46 0 0 $$date{$_} // $self->transform_token_value('target_token', $_, 'date', $date)
46 0 0 ($$date{$_} // $self->transform_token_value('target_token', $_, 'date', $date)) // $$self{'defaults'}{$_}
1134 77 6 2 $$date{$_} // $self->transform_token_value('target_token', $_, 'date', $date)
83 2 0 ($$date{$_} // $self->transform_token_value('target_token', $_, 'date', $date)) // $$self{'defaults'}{$_}
1201 2 50 0 $alias // $internal
1319 148 0 0 $args{'date_string'} // $date_part
1346 80 53 126 $token eq 'year' or $token eq 'year_abbr'