Branch Coverage

blib/lib/Net/SDP/Time.pm
Criterion Covered Total %
branch 70 128 54.6


line true false branch
33 1 3 if defined $t
57 0 1 unless ($t =~ /^([0-9]+) ([0-9]+)$/)
78 0 0 if ($self->is_permanent)
85 0 0 unless ($r =~ /^([0-9]+[dhms]?)( [0-9]+[dhms]?){2,}$/)
91 0 0 if ($values[0] == 0)
125 3 45 if (defined $start_time)
128 0 3 if $start_time == 0
136 3 15 if defined $end_time
143 3 10 if defined $start_time
144 0 13 if $self->start_time_ntp == 0
151 3 2 if defined $end_time
152 0 5 if $self->end_time_ntp == 0
158 0 4 if $self->is_permanent
164 0 3 if $self->is_permanent
165 1 2 if $self->end_time_ntp == 0
172 2 15 if ($self->start_time_ntp == 0) { }
189 0 0 if ($self->end_time_ntp == 0) { }
206 1 4 if ($self->is_permanent)
212 2 2 if (@{$$self{'r'};}) { }
215 1 1 if ($self->end_time_ntp == 0) { }
239 0 3 if ($$repeat{'interval'} == 604800) { }
0 3 elsif ($$repeat{'interval'} == 86400) { }
3 0 elsif ($$repeat{'interval'} == 3600) { }
258 0 0 if $friendlierOffset =~ /^[0-9]+$/
261 0 0 if $friendlierDuration =~ /^[0-9]+$/
274 3 0 if (not $$repeater{'interval'} =~ /^[0-9]+$/) { }
278 0 0 if $friendlierInterval =~ /^[0-9]+$/
285 0 3 if (scalar @{$$repeater{'times'};} > 1) { }
0 3 elsif (scalar @{$$repeater{'times'};} == 1) { }
293 0 3 if (scalar @repeatSlots > 1) { }
1 2 elsif (scalar @repeatSlots == 1) { }
308 0 2 if ($self->start_time_ntp == 0) { }
324 0 0 length $times[$item] == 1 ? :
337 0 3 if ($value % 604800 == 0) { }
0 3 elsif ($value % 86400 == 0) { }
3 0 elsif ($value % 3600 == 0) { }
0 0 elsif ($value % 60 == 0) { }
339 0 0 $value == 1 ? :
343 0 0 $value == 1 ? :
347 3 0 $value == 1 ? :
351 0 0 $value == 1 ? :
354 0 0 $value == 1 ? :
363 0 4 unless defined $interval
364 0 4 unless defined $duration
365 0 4 unless defined $offsets
366 0 4 if $interval =~ /^\d+$/ and $interval == 0
368 0 4 if ($self->is_permanent)
374 3 1 if ref $offsets ne 'ARRAY'
386 0 1 unless defined $num and defined $$self{'r'}[$num]
390 1 1 if $loop == $num
412 0 1 unless defined $num
414 0 1 unless defined $$self{'r'}[$num]
422 4 0 if (defined $$self{'r'})
431 0 7 unless ($value =~ /^[0-9]+[dhms]?$/)
437 7 0 unless $value =~ /^[0-9]+[dhms]$/
441 1 6 if $value == 0
444 1 5 if ($value % 86400 == 0) { }
3 2 elsif ($value % 3600 == 0) { }
2 0 elsif ($value % 60 == 0) { }
462 0 20 unless ($value =~ /^[0-9]+[dhms]?$/)
468 17 3 if ($value =~ /^[0-9]+s?$/)
469 0 17 if substr($value, -1, 1) eq 's'
476 1 2 if ($unit eq 'd') { }
1 1 elsif ($unit eq 'h') { }