Branch Coverage

blib/lib/Algorithm/Cron.pm
Criterion Covered Total %
branch 75 80 93.7


line true false branch
158 49 87 if $spec eq '*'
165 8 80 if $val =~ s[/(\d+)$][]
167 7 81 if $val =~ /^(.+)-(.+)$/
168 7 81 if ($val eq '*') { }
10 71 elsif ($kind eq 'mon') { }
11 60 elsif ($kind eq 'wday') { }
180 1 3 if defined $end and $end == 0 and $val > 0
183 1 87 unless $val =~ /^\d+$/
184 14 73 if defined $end
189 2 85 if ($kind eq 'wday' and $vals[-1] == 7)
190 2 0 unless $vals[0] == 0
250 0 22 unless grep {$_ eq $base;} 'local', 'utc'
252 21 1 if (exists $params{'crontab'})
257 1 20 unless @fields >= 5
258 0 20 unless @fields <= 6
260 16 4 if @fields < 6
264 1 20 unless exists $params{'sec'}
271 1 121 unless exists $params{$_}
274 0 72 unless not defined $$self{$_} or scalar @{$$self{$_};}
311 6 21 unless $$self{$field}
322 265 713 unless my $spec = $$self{$FIELDS[$idx]}
331 103 610 if ($idx == 6) { }
334 87 16 if defined $new
337 16 87 if (not defined $new) { }
8 79 elsif ($new > $old) { }
352 164 446 if (not defined $new) { }
70 376 elsif ($new > $old) { }
375 6 527 if ($idx == 3 and $was_mon != $$t[4])
405 5 240 unless $self->next_time_field(\@t, 4)
408 29 211 if (defined $$self{'mday'} and defined $$self{'wday'}) { }
84 127 elsif (defined $$self{'mday'}) { }
74 53 elsif (defined $$self{'wday'}) { }
414 5 24 unless $self->next_time_field(\@wday_t, 6)
420 14 15 unless $self->next_time_field(\@mday_t, 3)
423 4 25 if ($next_time_by_wday > $next_time_by_mday) { }
425 0 4 if $mday_restart
429 4 21 if $wday_restart
433 10 74 unless $self->next_time_field(\@t, 3)
436 11 63 unless $self->next_time_field(\@t, 6)
440 141 376 unless $self->next_time_field(\@t, $idx)