Branch Coverage

blib/lib/Date/Tie.pm
Criterion Covered Total %
branch 141 156 90.3


line true false branch
39 0 218 if $key eq 'monthday'
45 2 216 if ($value =~ /e/i)
51 11 170 if ($i_value != $value or $key eq 'frac' or exists $Date::Tie::Frac{$key})
55 11 37 unless defined $frac
57 31 17 if ($key eq 'frac')
58 15 16 if ($value < 0 or $value >= 1)
63 2 13 if $value < 0 and $frac != 0
69 16 1 if (exists $Date::Tie::Frac{$key})
77 3 13 if $value < 0 and $frac != 0
83 2 14 if (length $frac > 9)
88 0 5 if ($_ == 3)
95 1 4 if ($frac =~ /000.$/) { }
1 3 elsif ($frac =~ /999.$/) { }
114 4 12 if ($not_frac_key eq 'hour')
118 6 10 if ($not_frac_key eq 'minute')
132 12 159 if ($key eq 'tz')
137 16 143 if ($key eq 'tzhour' or $key eq 'tzminute')
138 1 15 unless exists $$self{'tz100'}
139 3 13 if ($key eq 'tzhour') { }
151 1 142 if ($key eq 'utc_epoch')
157 27 115 if ($key eq 'epoch')
163 21 94 if ($key eq 'month')
164 0 21 if exists $$self{'month'} and $$self{'month'} == $value
165 1 20 unless exists $$self{'day'}
174 17 4 if ($value >= $Date::Tie::Min{$key} and $value <= $Date::Tie::Max{$key}) { }
183 5 16 if ($$self{'day'} >= 29)
188 0 5 if ($tmp_month != $$self{'month'})
195 13 81 if ($key eq 'year')
196 0 13 if exists $$self{'year'} and $$self{'year'} == $value
197 2 11 unless exists $$self{'day'}
208 2 11 if ($$self{'day'} >= 29)
213 0 2 if ($tmp_month != $$self{'month'})
220 1 80 if ($key eq 'weekyear')
221 1 0 exists $$self{'week'} ? :
222 1 0 exists $$self{'weekyear'} ? :
223 0 1 unless exists $$self{'epoch'}
235 5 75 unless (exists $$self{$key})
240 55 2 if ($value >= $Date::Tie::Min{$key} and $value <= $Date::Tie::Max{$key} and $key ne 'weekday' and $key ne 'yearday' and $key ne 'week')
242 33 22 if (exists $$self{'epoch'})
248 10 45 if ($key eq 'day')
258 11 14 unless (exists $$self{'epoch'})
270 0 600 if $key eq 'monthday'
272 50 550 if ($key eq 'frac')
275 18 532 if (exists $Date::Tie::Frac{$key})
278 3 15 if $Date::Tie::Frac{$key} == 1
280 10 5 if ($not_frac_key eq 'hour')
284 5 10 if ($not_frac_key eq 'minute')
288 5 10 if $value >= 0 and $value < 10
289 2 13 unless $value =~ /\./
292 13 519 if ($key eq 'tz')
294 5 8 $$self{'tz100'} < 0 ? :
297 19 500 if ($key eq 'tzhour')
298 9 10 $$self{'tz100'} < 0 ? :
303 17 483 if ($key eq 'tzminute')
304 7 10 $$self{'tz100'} < 0 ? :
310 78 405 unless (exists $$self{$key})
312 26 52 if ($key eq 'epoch' or not exists $$self{'epoch'})
314 24 2 exists $$self{'day'} ? :
315 24 2 exists $$self{'month'} ? :
316 24 2 exists $$self{'year'} ? :
317 24 2 exists $$self{'hour'} ? :
318 24 2 exists $$self{'minute'} ? :
319 24 2 exists $$self{'second'} ? :
330 22 4 if $key eq 'epoch'
337 3 53 unless $$self{'weekday'}
341 6 50 if ($key eq 'week' or $key eq 'weekyear')
343 2 4 if ($$self{'yearday'} > 361)
349 2 0 if $$self{'day'} >= $last_day
351 0 6 if ($$self{'week'} == 0)
357 2 4 if $$self{'week'} < 2 and $$self{'month'} > 10
358 0 6 if $$self{'week'} > 50 and $$self{'month'} < 2
363 7 454 if $key eq 'weekday'
364 5 449 if $key eq 'utc_epoch'
365 449 0 if $key ne 'yearday'
379 0 18 unless $$self{'weekday'}
391 3 3 if ref $class
408 4 8 if $lastkey eq 'tz'
409 4 4 if $lastkey eq 'epoch'