Branch Coverage

blib/lib/XML/RSS/Timing.pm
Criterion Covered Total %
branch 94 118 79.6


line true false branch
14 8 0 unless defined &DEBUG
176 55 144 unless $_[0]{'skipHours'}
199 84 if @_ == 1
180 0 287 unless defined $h and length $h and $h =~ /^\d\d?$/s and $h >= 0 and $h <= 23
201 79 72 unless $_[0]{'skipDays'}
151 72 if @_ == 1
205 0 141 unless defined $d and length $d
207 0 141 unless exists $day_name2number{$d}
231 134 44 if @_ == 1
233 0 44 unless @_ == 2 and defined $freq and $freq =~ /^\d{1,5}$/s
265 0 209 if @_ == 1
266 0 209 unless @_ == 2 and defined $base and length $base
271 0 209 unless defined $date
294 0 65 if @_ == 1
296 0 65 unless @_ == 2 and defined $period and length $period
301 18 47 if ($period eq 'hourly') { }
18 29 elsif ($period eq 'daily') { }
18 11 elsif ($period eq 'weekly') { }
7 4 elsif ($period eq 'yearly') { }
4 0 elsif ($period eq 'monthly') { }
337 118 427 if @_ > 1
357 150 2 if @_ == 1
359 0 2 unless @_ == 2 and defined $ttl and $ttl =~ /^\d{1,6}$/s
396 134 3 if @_ == 1
398 0 3 unless @_ == 2 and defined $max and $max =~ /^\d{1,9}$/s
433 137 5 if @_ == 1
435 0 5 unless @_ == 2 and defined $min and $min =~ /^\d{1,9}$/s
471 0 137 unless defined $self->lastPolled
473 3 60 unless (defined $$self{'updatePeriod_sec'} or $self->ttl or $self->skipHours or $self->skipDays)
482 6 128 if (($$self{'updateBase_sec'} || 0) > $self->lastPolled)
510 4 130 if ($min)
514 4 0 if $soon > $later
518 9 125 if ($max)
522 6 3 if $far < $later
553 134 1132 if (not defined $start_hour) { }
0 2225 elsif ($h == $start_hour and $d == $start_day) { }
562 134 1132 unless ($day_is_skippable[$d] or $hour_is_skippable[$h])
591 65 69 if ($interval) { }
9 60 elsif (($self->ttl || 0) > 0) { }
625 0 486 unless defined $date
627 472 14 if (my($Y, $M, $D, $h, $m, $s, $s_fract, $tz_sign, $tz_h, $tz_m) = $date =~ /^ (\d\d\d\d) # year (?: -([01]\d) # month (?: -([0123]\d) # day (?: T([012]\d):([012345]\d) # hh:mm (?: :([0123456]\d) # seconds (?: (\.\d+) # fractions of a second )? )? # # And now the TZ: # (?: Z # Zulu | (?: # or by offset: ([-+]) ([012]\d):([012345]\d) # hh:mm, with leading '+' or '-' ) )? )? )? )? $ /sx) { }
673 3 469 unless defined $M
674 6 466 unless defined $D
675 10 462 unless defined $h
676 10 462 unless defined $m
677 428 44 unless defined $s
679 2 470 if $Y < 1902 or $Y > 2037
680 2 468 if $M < 1 or $M > 12
681 1 467 if $D < 1 or $D > 31
682 0 467 if $h < 0 or $h > 23
683 0 467 if $h < 0 or $h > 59
684 0 467 if $h < 0 or $h > 60
687 201 266 if (defined $tz_sign)
689 20 181 if $tz_sign eq '-'
693 1 466 unless defined $time
696 0 466 if $s_fract and $s_fract >= 0.5
725 306 0 if @_ > 1
742 3 3 unless $_[0]{'complaints'}
749 0 3 if ($$self{'_die'}) { }