Branch Coverage

blib/lib/WWW/Link.pm
Criterion Covered Total %
branch 68 166 40.9


line true false branch
44 0 32 unless $url
45 0 32 if ref $url
162 10 30 if $stat & 1
169 0 0 if (shift())->{'status'} == 0
183 89 116 unless @_
185 66 50 unless defined $$self{'status'} and $$self{'status'} == $status
192 0 32 unless @_
194 32 0 unless defined $$self{'check-method'} and $$self{'check-method'} == $status
203 0 0 unless @_
205 0 0 unless $set
206 0 0 if $set
211 0 0 unless @_
213 0 0 unless $set
214 0 0 if $set
220 0 0 unless @_
222 0 0 unless $set
223 0 0 if $set
228 0 0 unless @_
230 0 0 unless $set
231 0 0 if $set
236 0 0 unless @_
238 0 0 unless $set
239 0 0 if $set
252 0 30 unless $status
253 29 1 unless $$self{'status'} & $status
266 0 40 unless $status
267 0 40 if $$self{'status'} & $status
298 0 0 unless @_
369 0 3 unless defined $test_time
371 3 0 unless defined $base
372 0 3 unless ($base =~ /^[0-9]*[1-9][0-9]*/)
379 1 2 if ($self->is_damaged)
380 0 2 if ($self->is_abandoned)
381 0 2 if ($self->is_broken)
383 2 0 if ($self->is_disallowed or $self->is_unsupported)
386 0 3 unless $factor
389 0 3 wantarray ? :
417 2 0 unless @_
419 0 0 unless $time =~ /^[+-]?\d+$/
433 0 0 unless @_
435 0 0 unless $time =~ /^[+-]?\d+$/
436 0 0 if (not defined $$self{'last_refresh'} && $time < $$self{'last_refresh'}) { }
440 0 0 if $WWW::Link::verbose & 16
456 0 0 unless $redirect_url
457 0 0 unless $$self{'redirects'}
464 0 0 if $$redir_list[$i] = $redirect_url
481 0 0 unless $$self{'fix_suggestions'}
489 0 0 if $$sugg_list[$i] = $suggestion
492 0 0 if $count < @$sugg_list
505 0 8 if @_ or defined $redirects and not ref($redirects) =~ /ARRAY/
507 8 0 if defined $redirects
523 0 2 if @_
525 2 0 if (wantarray)
529 2 0 if defined $redir
543 1 1 unless ref $redir
548 0 1 if ($@ and not $@ =~ /Can't locate object method.*header/)
552 1 0 if (defined $url)
557 0 0 if $redir->can('as_string')
559 0 0 if (ref $redir)
577 0 0 unless @_
595 0 0 if $$self{'fix_suggestions'}
596 0 0 if $$self{'redirects'}
609 100 32 unless @_
657 12 37 if (not $stat & 2) { }
19 18 elsif (not defined $$self{'last_fail'} or time - $$self{'last_fail'} > $WWW::Link::inter_test_time) { }
667 9 40 unless $$self{'long_reliability'}
668 9 40 unless $$self{'short_reliability'}
680 0 12 if $WWW::Link::verbose & 4
688 0 19 if $WWW::Link::verbose & 4
692 2 17 if $$self{'breakcount'} == 10
694 2 17 if $$self{'breakcount'} == 4
715 8 8 unless $$self{'long_reliability'}
716 8 8 unless $$self{'short_reliability'}
761 0 84 if defined $$self{'checkcount'}
848 0 111 unless defined $age
850 0 111 unless $age =~ /^\d+$/
852 18 0 wantarray ? :
18 93 unless defined $$self{'test_hist'}
854 0 93 if ($age > 10)
858 3 0 wantarray ? :
3 90 if $age > $#{$$self{'test_hist'};}
860 90 0 wantarray ? :
881 29 57 if $cookie