Branch Coverage

blib/lib/DateTime/Event/Cron.pm
Criterion Covered Total %
branch 135 172 78.4


line true false branch
26 0 29 @_ == 1 ? :
30 2 27 unless $parms{'cron'}
39 0 1 @_ == 1 ? :
48 4 7 if ref $set and not $@
58 0 22 if $sparms{'next'} or $sparms{'recurrence'} or $sparms{'previous'}
73 26 28 @_ == 1 ? :
83 0 0 @_ == 1 ? :
90 0 0 if (ref $dtc and not $@)
92 0 0 if defined $dtc->user
103 0 1 unless (ref $fh)
107 0 0 unless open $fh, "<$file"
118 12 432 if not $date or $date->second
119 277 42 if $self->minute->contains($date->minute) and $self->hour->contains($date->hour) and $self->days_contain($date->day, $date->dow)
128 0 0 unless $date
129 0 0 if $self->minute->contains($date->minute) and $self->hour->contains($date->hour) and $self->days_contain($date->day, $date->dow)
151 99 0 $date ? :
152 22 77 if $date->is_infinite
161 81 0 $date ? :
162 22 59 if $date->is_infinite
173 0 78 unless ref $date
174 50 28 $self->valid($date) ? :
181 0 59 unless ref $date
182 36 23 $self->valid($date) ? :
195 0 28 unless ref $date
199 8 20 if $date->second
205 3 25 if (not $self->month->contains($date->month)) { }
12 13 elsif (not $self->days_contain($date->day, $date->dow)) { }
5 8 elsif (not $self->hour->contains($date->hour)) { }
220 3 25 if $self->valid($date)
231 5 35 if $date->day < $day_orig
236 5 30 if $date->hour < $hour_orig
241 5 25 if $date->minute < $min_orig
252 0 23 unless ref $date
256 3 20 if (not $self->month->contains($date->month)) { }
10 10 elsif (not $self->days_contain($date->day, $date->dow)) { }
3 7 elsif (not $self->hour->contains($date->hour)) { }
271 3 20 if $self->valid($date)
277 9 25 unless ($self->month->contains($date->month))
282 22 12 unless ($self->days_contain($date->day, $date->dow))
286 9 13 if $date->day > $day_orig
290 21 4 unless ($self->hour->contains($date->hour))
293 3 18 if $date->hour > $hour_orig
297 22 0 unless ($self->minute->contains($date->minute))
301 2 20 if $date->minute > $min_orig
313 0 54 unless $date and $unit
354 48 24 if ($next_min <= $last_min)
356 40 8 if ($next_hour <= $last_hour)
358 19 21 if ($next_day <= $last_day or $@)
360 9 10 if ($next_month <= $last_month)
379 50 22 unless $@
395 43 25 if ($prev_min >= $last_min)
397 31 12 if ($prev_hour >= $last_hour)
399 21 10 if ($prev_day >= $last_day or $@)
401 12 9 if ($prev_month >= $last_month)
420 36 32 unless $@
449 33 5573 if (@_)
462 0 0 if (ref $date)
468 0 0 if $self->days_contain($date->day, $date->dow)
525 1 53 unless defined $cron
528 1 52 if (ref $cron) { }
536 9 44 unless @line >= 5
539 44 0 unless (defined $user_mode)
541 4 40 if (@line > 1 and $line[0] =~ /^\w+$/)
545 4 40 if $user_mode
558 6 29 scalar @dom_list == scalar @$dom_range && scalar @dow_list != scalar @$dow_range ? :
560 12 23 scalar @dow_list == scalar @$dow_range && scalar @dom_list != scalar @$dom_range ? :
562 29 6 unless ($self->dom_squelch)
567 27 6 if $_ <= $Month_Max[$month - 1]
570 2 27 unless $pass
578 0 269 unless my $val = $self->_range->{$name}
588 2 197 unless @list
589 5 192 if $list[-1] > $range->[-1]
591 3 189 if ($name eq 'dow' and $set->contains(0))
593 3 0 unless $set->contains(7)
596 2 190 if $list[0] < $range->[0]
611 0 1832 unless defined $dom and defined $dow
615 173 1659 if $self->dom_squelch
616 1390 269 if $self->dow_squelch
617 126 143 unless $dom_c
636 455 11328 if (@_)
663 0 202 unless defined $string and ref $range
681 0 139 unless exists $hash->{$entry}
683 0 139 wantarray ? :
689 0 132 unless exists $hash->{$entry}
691 0 132 wantarray ? :
697 404 271 if (@_)