Branch Coverage

blib/lib/Mojar/Cron.pm
Criterion Covered Total %
branch 71 76 93.4


line true false branch
56 23 2 if (exists $param{'pattern'}) { }
1 1 elsif (exists $param{'parts'}) { }
63 0 1 exists $param{'sec'} ? :
65 1 0 unless $given_sec
69 14 11 if @values < 6
71 0 25 if %param
84 64 110 if not defined $spec or $spec eq "*"
91 9 105 if $val =~ s[/(\d+)$][]u
93 13 101 if $val =~ /^(.+)-(.+)$/u
95 8 106 if ($val eq '*') { }
11 95 elsif ($field eq 'day') { }
13 82 elsif ($field eq 'month') { }
20 62 elsif ($field eq 'weekday') { }
112 2 5 if defined $end and $end == 0 and $val > 0
118 4 110 if ($field eq "weekday" and $vals[-1] == 7)
119 4 0 unless $vals[0] == 0
133 5 266 unless $self->satisfiable(4, $dt)
135 34 232 if (defined $self->{'day'} and defined $self->{'weekday'}) { }
75 157 elsif (defined $self->{'day'}) { }
114 43 elsif (defined $self->{'weekday'}) { }
148 5 29 if ($next_by_day <= $next_by_weekday) { }
150 0 5 if $day_restart
154 5 24 if $weekday_restart
158 9 66 unless $self->satisfiable(3, $dt)
161 9 105 unless $self->satisfiable(6, $dt)
164 48 195 unless $self->satisfiable(2, $dt)
165 49 146 unless $self->satisfiable(1, $dt)
166 62 84 unless $self->satisfiable(0, $dt)
178 154 990 $component == 6 ? :
182 154 740 $component == 6 ? :
185 691 346 if $_ >= $old
189 154 740 if ($component == 6) { }
186 554 elsif (not defined $new) { }
119 435 elsif ($new > $old) { }
191 137 17 if defined $new
194 17 137 if (not defined $new) { }
24 113 elsif ($new > $old) { }
230 8 683 if ($component == 3 and $was_month != $dt->[4])