Branch Coverage

blib/lib/Date/Parse/Modern.pm
Criterion Covered Total %
branch 53 64 82.8


line true false branch
145 1 42 unless (defined $str)
163 15 27 if ($str =~ /$rule_1/)
165 14 1 if ($2 or $3)
172 1 14 if ($5 or $6)
178 1 0 if ($month > 12)
185 27 15 unless ($year)
203 17 25 if (not $month and $str =~ /$rule_2/)
210 4 13 if ($1) { }
218 5 8 unless ($year)
228 5 37 if (not $month and $str =~ /(.*)($MONTH_REGEXP)(.*)/)
236 2 3 if ($before eq '') { }
3 0 elsif ($before and $after) { }
237 2 0 if ($after =~ /(\d{2})$sep(\d{2,4})/)
249 1 2 if ($2 ne ":")
266 32 10 if ($str =~ /$rule_3/)
276 1 31 if ($ampm eq "pm")
281 2 0 if ($ampm and $hour == 24 || $hour == 12)
290 4 6 unless ($has_time or $has_date)
292 1 3 if ($str =~ /(\d{4})(\d{2})(\d{2})T(\d\d)(\d\d)(\d\d)Z/) { }
309 1 38 unless ($month)
314 1 38 unless ($day)
319 5 34 unless ($year)
324 8 31 if ($year < 100)
344 0 39 if ($err and $err =~ /Undefined subroutine/)
370 17 22 if ($ret and $str =~ /$tz_rule/) { }
20 2 elsif ($ret) { }
374 11 6 if ($6 or $7) { }
390 5 1 if ($3 eq "-")
409 0 39 if ($debug)
428 20 0 if (defined $LOCAL_TZ_OFFSET)
442 0 0 if ($USE_TZ_CACHE and $x->{$cache_key})
452 0 0 if ($USE_TZ_CACHE)