Branch Coverage

lib/DR/DateTime.pm
Criterion Covered Total %
branch 56 70 80.0


line true false branch
20 1 1 if ('DR::DateTime' eq ref $cv)
28 1 1 if ('DR::DateTime' eq ref $cv)
32 0 1 unless $pct
44 39 6 if (defined $tz)
46 0 39 unless defined $2
54 2 43 if defined $DR::DateTime::Defaults::TZFORCE
62 0 35 unless defined $str
67 1 34 if (/^\d+$/)
70 28 6 if (/^(\d{4})-(\d{2})-(\d{2})(?:\s+|T)(\d{2}):(\d{2}):(\d{2})(\.\d+)?\s*(\S+)?$/)
76 2 4 if (/^(\d{4})-(\d{2})-(\d{2})(?:\s+|T)(\d{2}):(\d{2})$/)
82 1 3 if (/^(\d{4})-(\d{2})-(\d{2})$/)
88 3 0 if (/^(\d{1,2})\.(\d{1,2})\.(\d{4})\s+(\d{2}):(\d{2}):(\d{2})(\.\d+)?\s*(\S+)?$/)
102 34 0 if (/^[+-]\d{1,4}$/) { }
121 9 25 if $nocheck
136 0 123 unless $format
142 7 116 unless ($patterns)
156 239 0 $patterns->{$1} ? :
231 7 2 if $self->day == $new->day
232 2 0 if ($new->day < $self->day)
241 6 0 unless defined $n
246 5 1 unless defined $s
251 6 0 unless defined $m
256 5 1 unless defined $h
261 5 1 unless defined $d
266 2 4 unless defined $m
286 1 5 unless defined $y
311 1 5 if ($to eq 'second')
317 1 4 if ($to eq 'minute')
322 1 3 if ($to eq 'hour')
327 1 2 if ($to eq 'day')
332 1 1 if ($to eq 'month')
337 1 0 if ($to eq 'year')
356 1 0 if (defined $tz)
364 0 1 if ($tz eq 'local') { }
0 1 elsif (not $tz =~ /^[+-]\d{4}$/) { }