Branch Coverage

blib/lib/Class/Date.pm
Criterion Covered Total %
branch 73 144 50.6


line true false branch
26 7 0 unless defined $Class::Date::WARNINGS
27 7 0 if ($] > 5.006) { }
42 0 7 if ($@)
43 0 0 if $Class::Date::WARNINGS
62 827 279 if (not defined $tz or $tz eq $Class::Date::NOTZ_TIMEZONE) { }
65 0 827 if exists $INC{'Env/C.pm'}
69 0 279 if exists $INC{'Env/C.pm'}
78 546 0 if $Class::Date::RESTORE_TZ
79 0 546 if $@
121 0 12 if ($symbol eq '-DateParse') { }
0 12 elsif ($symbol eq '-EnvC') { }
122 0 0 unless ($Class::Date::DateParse++)
123 0 0 if (eval { do { require Date::Parse } }) { }
126 0 0 if $Class::Date::WARNINGS
131 0 0 unless ($Class::Date::EnvC++)
132 0 0 unless (eval { do { require Env::C } })
133 0 0 if $Class::Date::WARNINGS
149 84 11 if defined $time and not defined $tz and blessed $proto and $proto->isa('Class::Date')
153 16 118 unless defined $tz
155 5 129 unless defined $time
156 2 127 if (blessed $time and $time->isa('Class::Date')) { }
0 127 elsif (blessed $time and $time->isa('Class::Date::Rel')) { }
13 114 elsif (ref $time eq 'ARRAY') { }
0 114 elsif (ref $time eq 'SCALAR') { }
8 106 elsif (ref $time eq 'HASH') { }
195 4 25 exists $$val{'min'} ? :
17 12 exists $$val{'sec'} ? :
207 123 1 if defined $ret
213 0 124 unless $time
215 1 123 if ($time eq 'now') { }
2 121 elsif ($time =~ /^\s*(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)\d*\s*$/) { }
22 99 elsif ($time =~ /^\s*( \-? \d+ (\.\d+ )? )\s*$/x) { }
98 1 elsif ($time =~ / ^\s* ( \d{0,4} ) - ( \d\d? ) - ( \d\d? ) ( (?: T|\s+ ) ( \d\d? ) : ( \d\d? ) ( : ( \d\d? ) (\.\d+)?)? )? /x) { }
249 0 0 unless defined $zone
250 0 0 if ($zone eq $Class::Date::GMT_TIMEZONE) { }
252 0 0 unless defined $ss
253 0 0 unless defined $mm
254 0 0 unless defined $hh
255 0 0 unless defined $day
256 0 0 unless defined $month
257 0 0 if not defined $year
261 0 0 unless defined $ss
262 0 0 unless defined $mm
263 0 0 unless defined $hh
264 0 0 unless defined $day
265 0 0 unless defined $month
266 0 0 if not defined $year
286 81 85 $$s[10] eq $Class::Date::GMT_TIMEZONE ? :
296 0 166 if $@
299 10 156 $s->_check_sum != $sum ? :
300 3 163 if $Class::Date::RANGE_CHECK and $$s[11]
307 91 100 $$s[10] eq $Class::Date::GMT_TIMEZONE ? :
395 0 0 $$s[3] < 12 ? :
400 0 0 if ($hour == 0)
459 0 0 $m > 2 ? :
460 0 0 $m > 2 ? :
472 0 0 $delta >= 0 ? :
491 0 2 unless eval { do { $new_date = $s->new([$s->year, 2, 29], $s->tz) } }
508 2 13 if (blessed $rhs and $rhs->isa('Class::Date')) { }
4 9 elsif (blessed $rhs and $rhs->isa('Class::Date::Rel')) { }
9 0 elsif ($rhs) { }
510 2 0 if $Class::Date::DST_ADJUST
523 12 19 unless blessed $rhs and $rhs->isa('Class::Date::Rel')
525 0 31 unless blessed $rhs and $rhs->isa('Class::Date::Rel')
528 18 13 $$rhs[1] ? :
533 0 31 if ($Class::Date::DST_ADJUST and my $dstdiff = $$retval[8] - $$s[8])
539 20 11 if ($$rhs[0])
541 18 2 $$retval[1] > 0 ? :
550 2 0 if ($Class::Date::MONTH_BORDER_ADJUST and $retval and $expected_month != $$retval[1])
568 85 7 unless (blessed $rhs and $rhs->isa('Class::Date'))
571 88 4 $rhs ? :
572 8 84 if $reverse