Branch Coverage

lib/Schedule/Cron/Events.pm
Criterion Covered Total %
branch 98 108 90.7


line true false branch
17 2 30 if ($cronline =~ /^\s*#/)
18 1 29 if ($cronline =~ /^\w+=\S+/)
19 2 27 unless ($cronline =~ /^\s*\S+\s+\S+\s+\S+\s+\S+\s+\S+/)
37 0 27 if (exists $opts{'Seconds'}) { }
26 1 elsif (exists $opts{'Date'}) { }
44 0 26 if ($date[0] < 0 or $date[0] > 59)
47 0 26 if ($date[1] < 0 or $date[1] > 59)
50 0 26 if ($date[2] < 0 or $date[2] > 23)
53 0 26 if ($date[3] < 1 or $date[2] > 31)
56 0 26 if ($date[4] < 0 or $date[4] > 11)
59 1 25 if (time < 2147483648 and $date[5] > 137)
120 0 34 unless (@_ == 6)
131 30 4 if ($exact) { }
135 14 16 if ($exact) { }
138 11 3 if ($exact) { }
141 6 5 if ($pos == -1)
146 0 3 if ($pos == -1)
153 6 10 if ($pos == -1)
162 2 2 if (not $rv or $pos == -1)
181 0 26 if (@crondate < 5)
191 18 8 if (@{$ranges{'daynums'};} and $ranges{'daynums'}[0] == 0)
197 22 4 if (@{$ranges{'months'};} and $ranges{'months'}[0] == 0)
203 19 7 if (@{$ranges{'weekdays'};} and $ranges{'weekdays'}[-1] == 7)
205 1 18 if (not @{$ranges{'weekdays'};} or $ranges{'weekdays'}[0] != 0)
211 3 23 if ($crondate[2] ne '*' and $crondate[4] ne '*') { }
5 18 elsif ($crondate[2] eq '*' and $crondate[4] ne '*') { }
7 11 elsif ($crondate[4] eq '*' and $crondate[2] ne '*') { }
223 2 74 unless (@{$ranges{$_};})
225 1 23 unless (@{$ranges{'weekdays'};} or @{$ranges{'daynums'};})
228 1 22 if ($ranges{'minutes'}[-1] > 59)
229 1 21 if ($ranges{'hours'}[-1] > 23)
230 1 20 if ($ranges{'months'}[-1] > 12)
231 1 19 if (@{$ranges{'daynums'};} and $ranges{'daynums'}[-1] > 31)
232 1 18 if (@{$ranges{'weekdays'};} and $ranges{'weekdays'}[-1] > 6)
242 60 783 if ($set[$flag] == $val) { }
15 768 elsif ($set[$flag] > $val) { }
268 39 63 if ($monthnum == 2)
272 139 167 if ($_ > $maxday)
282 12 150 if $monthday < 1
283 32 118 if $monthday > $maxday
296 58 18 if ($self->{'pd'} == 0 or $self->{'pd'} > $#{$$self{'h'};})
305 46 12 if ($self->{'pc'} == 0 or $self->{'pc'} > $#{$$self{'g'};})
314 24 28 if ($self->{'pb'} == 0 or $self->{'pb'} > $#{$$self{'f'};})
329 15 22 if ($self->{'pa'} == 0 or $self->{'pa'} > $#{$$self{'e'};})
335 0 15 if (scalar(@{$self->{'set_e_checked_years'};} > 5))
342 11 26 unless ($rv)
354 38 4 if ($self->{'pd'} == -1)
363 30 8 if ($self->{'pc'} == -1)
372 19 11 if ($self->{'pb'} == -1)
381 16 15 if ($self->{'pa'} == -1)
386 12 19 unless ($rv)
395 46 158 !($year % 400) || !($year % 4) && $year % 100 ? :
402 23 79 $flag ? :
23 79 $flag ? :