Branch Coverage

blib/lib/DateTime/Format/PGN.pm
Criterion Covered Total %
branch 47 84 55.9


line true false branch
23 3 0 unless not defined $_[0] or $_[0] == 0
31 4 0 unless not defined $_[0] or $_[0] == 0
50 17 25 if ($date =~ /^(\?{4}|[1-2]\d{3})\.(\?{2}|0[1-9]|1[0-2])\.(\?{2}|0[1-9]|[1-2]\d|3[0-1])$/) { }
57 24 1 if ($self->{'fix_errors'})
60 24 0 if ($date =~ /(\A|\D)([1-2]\d{3})(\D|\Z)/ and $2 > 0)
65 20 4 if ($date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|3[0-1])\D+(0?[1-9]|[1-2][0-9]|3[0-1])(\D|\Z)/) { }
0 4 elsif (index($date, 'Jan') > -1) { }
0 4 elsif (index($date, 'Feb') > -1) { }
0 4 elsif (index($date, 'Mar') > -1) { }
0 4 elsif (index($date, 'Apr') > -1) { }
0 4 elsif (index($date, 'May') > -1) { }
1 3 elsif (index($date, 'Jun') > -1) { }
0 3 elsif (index($date, 'Jul') > -1) { }
0 3 elsif (index($date, 'Aug') > -1) { }
0 3 elsif (index($date, 'Sep') > -1) { }
0 3 elsif (index($date, 'Oct') > -1) { }
0 3 elsif (index($date, 'Nov') > -1) { }
0 3 elsif (index($date, 'Dec') > -1) { }
66 16 4 if ($2 < 13 and $3 > 12 or $2 == $3 and $2 < 13) { }
2 2 elsif ($3 < 13 and $2 > 12) { }
77 0 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|3[0-1])(\D|\Z)/ and $2 < 32 and $2 > 0
81 0 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9])(\D|\Z)/ and $2 < 32 and $2 > 0
85 0 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|3[0-1])(\D|\Z)/ and $2 < 32 and $2 > 0
89 0 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|30)(\D|\Z)/ and $2 < 32 and $2 > 0
93 0 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|3[0-1])(\D|\Z)/ and $2 < 32 and $2 > 0
97 1 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|30)(\D|\Z)/ and $2 < 32 and $2 > 0
101 0 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|3[0-1])(\D|\Z)/ and $2 < 32 and $2 > 0
105 0 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|3[0-1])(\D|\Z)/ and $2 < 32 and $2 > 0
109 0 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|30)(\D|\Z)/ and $2 < 32 and $2 > 0
113 0 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|3[0-1])(\D|\Z)/ and $2 < 32 and $2 > 0
117 0 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|30)(\D|\Z)/ and $2 < 32 and $2 > 0
121 0 0 if $date =~ /(\A|\D)(0?[1-9]|[1-2][0-9]|3[0-1])(\D|\Z)/ and $2 < 32 and $2 > 0
125 19 5 if (index($matches[1], '?') == -1 and index($matches[2], '?') == -1)
126 4 15 if ($matches[2] == 31 and $matches[1] == 4 || $matches[1] == 6 || $matches[1] == 9 || $matches[1] == 9 || $matches[1] == 11) { }
4 11 elsif ($matches[1] == 2) { }
131 1 3 if ($matches[2] == 29 and $matches[0] % 4 == 0 and $matches[0] % 100 > 0 or $matches[2] < 29) { }
143 25 17 if ($self->{'use_incomplete'}) { }
145 25 50 if index($_, '?') > -1
157 18 33 if index($_, '?') > -1
172 40 2 defined $dt->year ? :
173 30 12 defined $dt->month ? :
174 31 11 defined $dt->day ? :