Branch Coverage

blib/lib/Time/Piece/Cron.pm
Criterion Covered Total %
branch 29 132 21.9


line true false branch
180 0 1 if (defined $timepiece)
182 0 0 if (ref $timepiece ne 'Time::Piece' and $timepiece =~ /\b\d+\d/)
186 1 0 unless defined $timepiece
192 0 1 unless scalar @atoms
200 5 0 if (grep /\b$val\b/, @{$possibles;})
202 1 4 if $index == 2
205 1 4 if ($index == 2)
212 0 1 if not $found and scalar @{$atoms[4];} < 7
215 1 4 if ($index == 4)
216 1 0 if $found
217 0 0 if not $found and $mday
220 0 4 unless $found
256 0 0 if (defined $master)
258 0 0 if (ref $master ne 'Time::Piece' and $master =~ /\b\d+\d/)
262 0 0 unless defined $master
266 0 0 unless scalar @atoms
270 0 0 $mode == 3 ? :
282 0 0 if ($timepiece->year > $master->year + 1)
295 0 0 if scalar @{$possibles;} >= $max
296 0 0 if $index == 4 and $mode == 0
297 0 0 if $index == 4 and $pass == 2
298 0 0 if $index == 2 and $mode == 3 and $pass == 1
302 0 0 if ($index == 2)
308 0 0 if ($index == 3) { }
0 0 elsif ($index == 2) { }
0 0 elsif ($index == 1) { }
0 0 elsif ($index == 0) { }
309 0 0 if ($val == $timepiece->$ref) { }
0 0 elsif ($val > $timepiece->$ref) { }
320 0 0 if ($val == $timepiece->$ref) { }
0 0 elsif ($val > $timepiece->$ref) { }
325 0 0 if ($val > $max) { }
340 0 0 if ($val == $timepiece->$ref) { }
0 0 elsif ($val > $timepiece->$ref) { }
353 0 0 if ($val == $timepiece->$ref) { }
0 0 elsif ($val > $timepiece->$ref) { }
366 0 0 if ($ymd_lock)
375 0 0 if ($temp->mon == $timepiece->mon) { }
390 0 0 if defined $timepiece
396 0 0 unless (scalar @results)
402 0 0 if (scalar @results == 2)
403 0 0 if ($results[1]->epoch < $results[0]->epoch)
480 0 2 if (not defined $cron or $cron eq '')
482 0 0 if wantarray
488 0 2 if (scalar @segments != $$self{'cron_size'})
490 0 0 if wantarray
498 0 10 unless (scalar @ary)
500 0 0 if wantarray
504 0 10 if (grep /\D/, @ary)
506 0 0 if wantarray
513 1 1 if wantarray
576 0 10 if ($piece =~ m[/(\d+)$])
582 10 0 if (defined $$self{'alphamap'}[$index])
585 38 0 unless $piece =~ /$key/i
591 10 0 if (defined $$self{'conversion'}[$index])
599 2 8 if ($piece =~ /^\d+$/)
605 8 0 if ($piece =~ /\*/)
611 8 0 if ($piece =~ /(\d+)-(\d+)/)
616 0 8 if ($step) { }
620 0 0 if ($i == 0 or not $atoms[$i] % $step)
637 186 0 if (int $val <= $max)
670 0 0 if ($copy->_wday == $dow)
708 0 0 if ($wmax == scalar @{$ary[4];}) { }
0 0 elsif ($wmax != scalar @{$ary[4];} and $mmax != scalar @{$ary[3];} and $dmax != scalar @{$ary[3];}) { }
0 0 elsif ($wmax != scalar @{$ary[4];} and $mmax != scalar @{$ary[3];}) { }
747 0 0 if $i >= $number