Branch Coverage

lib/Sisimai/DateTime.pm
Criterion Covered Total %
branch 78 90 86.6


line true false branch
185 7 52 if ($value =~ /\A(\d+|\d+[.]\d+)([@$unitoftime])?\z/o) { }
5 47 elsif ($value =~ /\A(\d+|\d+[.]\d+)?([@$mathconsts])([@$unitoftime])?\z/o) { }
213 1 17 $argv1 ? :
215 0 18 if wantarray
228 1 1 $argv1 ? :
230 0 2 if wantarray
264 5900 12937 if ($p =~ /\A[A-Z][a-z]{2,}[,]?\z/) { }
5946 6991 elsif ($p =~ /\A\d{1,4}\z/) { }
2979 4012 elsif ($p =~ /\A([0-2]\d):([0-5]\d):([0-5]\d)\z/ or $p =~ /\A(\d{1,2})[-:](\d{1,2})[-:](\d{1,2})\z/) { }
1 4011 elsif ($p =~ /\A([0-2]\d):([0-5]\d)\z/) { }
1 4010 elsif ($p =~ /\A(\d\d?):(\d\d?)\z/) { }
11 3999 elsif ($p =~ /\A[APap][Mm]\z/) { }
266 2914 2986 if substr($p, -1, 1) eq ","
267 5 5895 if length $p > 3
269 2925 2975 if (grep {$p eq $_;} @{{abbr => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], full => ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']}->{'abbr'};}) { }
2972 3 elsif (grep {$p eq $_;} @{{abbr => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], full => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']}->{'abbr'};}) { }
280 2938 3008 if ($p > 31) { }
286 36 2972 if ($v->{'d'}) { }
288 36 0 unless $v->{'Y'}
299 2976 2 if ($1 < 24 and $2 < 60 and $3 < 60)
305 1 0 if ($1 < 24 and $2 < 60)
318 2900 1099 if ($p =~ /\A[-+][01]\d{3}\z/) { }
1065 34 elsif ($p =~ /\A[(]?[A-Z]{2,5}[)]?\z/) { }
328 2 32 if ($p =~ m[\A(\d{4})[-/](\d{1,2})[-/](\d{1,2})\z]) { }
18 14 elsif ($p =~ m[\A(\d{4})[-/](\d{1,2})[-/](\d{1,2})T([0-2]\d):([0-5]\d):([0-5]\d)\z]) { }
6 8 elsif ($p =~ m[\A(\d{1,2})/(\d{1,2})/(\d{1,2})\z]) { }
0 8 elsif ($p =~ m[\A(\d{1,2})[-/](\d{1,2})[-/](\d{4})]) { }
338 18 0 if $3 < 32
340 18 0 if ($4 < 24 and $5 < 60 and $6 < 60)
348 0 6 if $v->{'Y'} > "Time::Piece"->new->year + 1
352 0 0 if $1 < 32
360 11 2988 if ($v->{'T'} and $afternoon1)
365 1 10 if $t1[0] > 12
369 2 2997 if (defined $v->{'Y'} and $v->{'Y'} < 200)
376 36 2963 if (exists $altervalue->{'Y'} and not $v->{'Y'})
378 0 36 if ($altervalue->{'Y'} >= 82) { }
389 5 2994 if (grep {not defined $_;} values %$v)
395 2 2992 if ($v->{'Y'} < 1902 or $v->{'Y'} > 2037)
429 2970 48 if ($argv1 =~ /\A([-+])(\d)(\d)(\d{2})\z/) { }
1 47 elsif ($argv1 =~ /\A[A-Za-z]+\z/) { }
439 433 2537 if $digit->{'operator'} eq "-"
441 2 2968 if abs $ztime > 54000
463 0 45 if ref $argv1 and ref $argv1 ne "Time::Seconds"
464 2 43 if abs $argv1 > 54000
465 2 41 if $argv1 < 0