Branch Coverage

blib/lib/Calendar/Schedule.pm
Criterion Covered Total %
branch 78 254 30.7


line true false branch
585 0 1 $prefix ? :
588 0 1 if ($time =~ /^(\d\d\d\d)-(\d\d)-(\d\d) (\d\d?):(\d\d)$endrex/) { }
0 1 elsif ($time =~ /^(\d\d\d\d)-(\d\d)-(\d\d)$endrex/) { }
0 1 elsif ($time =~ /^(\d\d)-(\d\d)-(\d\d\d\d)$endrex/) { }
0 1 elsif ($time =~ /^(\d?\d)-($monrex)-(\d\d\d\d)\b$endrex/) { }
0 1 elsif ($time =~ /^($monrex) (\d?\d), (\d\d\d\d)\b$endrex/) { }
1 0 elsif ($time =~ /^\d+$endrex/) { }
0 0 elsif ($time =~ /^now\b$endrex/) { }
602 0 1 wantarray ? :
629 0 10 if $en =~ /^\s*$/
630 0 10 if $en =~ /^\s*#/
663 10 0 if ($#_ <= 1) { }
667 0 10 if ($#_ == 0) { }
671 0 10 if (/^\d\d\d\d-\d\d-\d\d $Calendar::Schedule::REweekday3 \d\d?(:\d\d)?-\d\d?(:\d\d)?([ap]m)? /) { }
0 10 elsif (/^\d\d\d\d-\d\d-\d\d \d\d?(:\d\d)?-\d\d?(:\d\d)?([ap]m)? /) { }
10 0 elsif (/^$Calendar::Schedule::REweekday3(?:,$Calendar::Schedule::REweekday3)*\s+\d\d?(:\d\d)?-\d\d?(:\d\d)?([ap]m)? /) { }
0 0 elsif (/^$Calendar::Schedule::RE1st(,$Calendar::Schedule::RE1st)* \ $Calendar::Schedule::REweekday3(?:,$Calendar::Schedule::REweekday3)*\s+\d\d?(:\d\d)?-\d\d?(:\d\d)?([ap]m)?\ /x) { }
0 0 elsif (/^(\d\d\d\d-\d\d-\d\d)T(\d\d:\d\d:\d\d)- (\d\d\d\d-\d\d-\d\d)T(\d\d:\d\d:\d\d)?/x) { }
0 0 elsif (/^(\d\d\d\d-\d\d-\d\d) / or /^(\d?\d-\w\w\w-\d\d\d\d) /) { }
0 0 elsif (/^\*\s*/) { }
0 0 elsif (/^($Calendar::Schedule::REweekday3)\b\s*/) { }
708 10 0 if ($timeslot =~ /^($Calendar::Schedule::REweekday3(?:,$Calendar::Schedule::REweekday3)*)\s+(\d\d?(?::\d\d)?)-(\d\d?(?::\d\d)?)((?:[ap]m)?)$/) { }
0 0 elsif ($timeslot =~ /^($Calendar::Schedule::RE1st(?:,$Calendar::Schedule::RE1st)*)\s+ ($Calendar::Schedule::REweekday3(?:,$Calendar::Schedule::REweekday3)*)\s+ (\d\d?(?::\d\d)?)-(\d\d?(?::\d\d)?)([ap]m)?$ /xi) { }
0 0 elsif ($timeslot =~ /^(\d\d\d\d-\d\d-\d\d)T(\d\d:\d\d:\d\d)- (\d\d\d\d-\d\d-\d\d)T(\d\d:\d\d:\d\d)$/x) { }
0 0 elsif ($timeslot =~ /^($Calendar::Schedule::REweekday3(?:,$Calendar::Schedule::REweekday3)*)$/) { }
0 0 elsif ($timeslot =~ /^(\d\d\d\d-\d\d-\d\d)((?:\ $Calendar::Schedule::REweekday3)?) \ (\d\d?)((?::\d\d)?)-(\d\d?)((?::\d\d)?)(?:am)?$/x) { }
0 0 elsif ($timeslot =~ /^(\d\d\d\d-\d\d-\d\d)((?: $Calendar::Schedule::REweekday3)?) (\d\d?)((?::\d\d)?)-(\d\d?)((?::\d\d)?)pm$/) { }
713 0 10 if ($description =~ /\s*:biweekly\b\s*/)
717 0 10 if ($description =~ /\s*:until\s+/)
724 0 10 if ($description =~ /:start\s+/)
753 0 0 if ($f =~ /^first|1st$/) { }
0 0 elsif ($f =~ /^second|2nd$/) { }
0 0 elsif ($f =~ /^third|3rd$/) { }
0 0 elsif ($f =~ /^fourth|4th$/) { }
0 0 elsif ($f =~ /^fifth|5th$/) { }
0 0 elsif ($f =~ /^last$/) { }
760 0 0 unless grep {$f1 eq $_;} @first
766 0 0 unless grep {$d1 eq $_;} @days
768 0 0 unless $rrule =~ /=$/
772 0 0 if (is_week_in_month($f, $t) and $t < $st || $st == 0)
804 0 0 if ($description =~ /\s*:biweekly\b\s*/)
808 0 0 if ($description =~ /\s*:until\s+/)
815 0 0 if ($description =~ /:start\s+/)
833 0 0 unless $minstart ne ''
834 0 0 unless $minend ne ''
838 0 0 if $w3 ne '' and strftime('%a', localtime $starttime) ne $w3 || strftime('%a', localtime $endtime) ne $w3
844 0 0 unless $minstart ne ''
845 0 0 unless $minend ne ''
849 0 0 if ($starttime < $endtime)
853 0 0 if $w3 ne '' and strftime('%a', localtime $starttime) ne $w3 || strftime('%a', localtime $endtime) ne $w3
859 0 0 if $starttime > $endtime
894 0 20 $#_ == -1 ? :
901 20 0 if ($timedesc =~ /^($Calendar::Schedule::REweekday3) (\d\d?(?::\d\d)?)((?:[ap]m)?)$/) { }
0 0 elsif ($timedesc =~ /^(\d?\d):(\d?\d)$/) { }
906 13 7 if ($pattern_hour =~ /:/)
909 0 20 if ($apm eq 'pm') { }
0 20 elsif ($apm eq 'am') { }
910 0 0 unless $pattern_hour <= 12
911 0 0 if ($pattern_hour < 12)
914 0 0 unless $pattern_hour <= 12
915 0 0 if ($pattern_hour == 12)
922 20 0 if ($pattern_sec ne '*')
928 20 0 if ($pattern_min ne '*')
934 20 0 if ($pattern_hour ne '*')
940 20 0 if ($pattern_wday ne '*')
954 9 11 unless @{$self->{'RowLabels'};} and $t eq $self->{'RowLabels'}[0]
962 0 0 if (not @{$self->{'ToDo'};}) { }
1004 1 0 unless exists $self->{'NextTableTime'}
1008 0 1 if ($self->{'ShowDays'} eq 'workdays')
1019 10 0 if (exists $ve->{'RRULE'} and $ve->{'RRULE'} =~ /\bFREQ=WEEKLY\b/) { }
0 0 elsif (exists $ve->{'RRULE'} and $ve->{'RRULE'} =~ /\bFREQ=MONTHLY;BYDAY=([^;]+)\b/) { }
1023 0 10 if ($ve->{'RRULE'} =~ /\bINTERVAL=(\d+)/)
1025 0 10 if ($ve->{'RRULE'} =~ /\bUNTIL=(\d+)/)
1028 0 10 if (defined $until and $d + $ve->{'DTSTART'} > $until)
1030 10 0 if ($d + $ve->{'DTSTART'} >= $mondaytime)
1031 10 0 if (exists $ve->{'DTEND'}) { }
1045 10 0 if (exists $ve->{'DTEND'}) { }
1057 0 0 if ($ve->{'RRULE'} =~ /\bINTERVAL=(\d+)/)
1059 0 0 if ($ve->{'RRULE'} =~ /\bUNTIL=(\d+)/)
1063 0 0 unless $bd =~ /^([+-][1-5])(\w\w)$/
1069 0 0 scalar keys %wds == 1 ? :
1070 0 0 unless (defined $ve->{'_cache_next'})
1073 0 0 if defined $until and $eventstarti > $until
1074 0 0 if $eventstarti < $mondaytime
1075 0 0 if ($eventstarti >= $mondaytime)
1076 0 0 if (exists $ve->{'DTEND'}) { }
1090 0 0 if (defined $ve->{'_cache_next'}{$eventstarti}) { }
1096 0 0 unless $t2 < $mondaytime + 86400 * scalar(@showdays)
1097 0 0 if defined $until and $t2 > $until
1098 0 0 if ($interval > 1)
1102 0 0 unless weekday_to_digits($wd) == (localtime $t2)[6]
1104 0 0 unless is_week_in_month($f, $t2)
1108 0 0 unless $flag
1127 0 10 if $col < 0 or $col >= scalar @showdays
1153 0 10 if $col < 0 or $col >= scalar @showdays
1165 2 5 unless defined $op[$di]
1166 1 6 if ($op[$di] > 0) { }
1173 0 0 if $_->{'date'} - $mondaytime >= 0
1175 0 1 if (@dayEntries)
1183 0 0 unless $r1
1184 0 0 $op[$i] == 0 ? :
1196 12 108 if $oi == 1
1198 24 84 if $oi > 0
1199 89 19 if (not $self->_table_get(@ind)) { }
9 10 elsif ($self->_table_get(@ind) eq 'continue') { }
1205 2 8 if $oi > 0
1207 8 2 if ($oi == 0) { }
1218 7 3 $counter > 1 ? :
1247 0 0 if $f > 5 or $f < -5
1248 0 0 if ($f > 0) { }
0 0 elsif ($f < 0) { }
1253 0 0 if (localtime $t1)[4] != $m
1260 0 0 if $d >= $lb and $d <= $ub
1320 0 0 if ($a[2] == 0 and $a[1] == 0) { }
0 0 elsif ($a[2] == 23) { }
1339 0 10 unless @rows
1340 0 10 if (not $end or $row eq $end) { }
1344 0 9 unless @rows
1356 2 23 if ($overlap == 0 and defined $$epr{join $;, $col, $r})
1362 2 23 if ($overlap > $oldoverlap)
1365 5 5 unless defined $self->{'overlap'}[$col]
1366 2 8 if $overlap > $self->{'overlap'}[$col]
1369 8 2 if ($overlap == 0) { }
1388 38 118 $overlap > 0 ? :
1389 58 98 defined $ret ? :
1399 0 0 unless open F, "<$f"
1402 0 0 wantarray ? :