Branch Coverage

blib/lib/WWW/Link/Tester/Complex.pm
Criterion Covered Total %
branch 36 158 22.7


line true false branch
325 4 77 if ($code eq $key)
330 0 14 if $$self{'verbose'}
334 0 14 unless $code =~ /[1-9][0-9]+/
338 0 14 unless ref $response
367 0 8 if ($WWW::Link::Tester::Complex::DEBUG)
369 0 8 if ($inputStr =~ / #" ]+? url \s* = \s* ["']? ([^"' >]+) ["']? [^>]+? > /xi) { }
404 0 30 unless $url
407 0 30 if ($VERBOSE or $WWW::Link::Tester::Complex::DEBUG)
413 16 14 if ($referrer)
414 1 29 if (keys %WWW::Link::Tester::Complex::url_hash > $WWW::Link::Tester::Complex::MAX_REDIRECTS)
415 0 1 if ($VERBOSE)
421 3 26 if (not $1 && $2) { }
422 0 3 if ($VERBOSE)
430 26 0 if ($1)
433 0 26 if ($protocol =~ /^telnet$/i)
434 0 0 if ($port) { }
441 0 0 if (not $ping) { }
446 0 26 unless ($agent->is_protocol_supported($protocol))
447 0 0 if ($VERBOSE)
455 0 26 if ($WWW::Link::Tester::Complex::DEBUG)
462 0 26 if ($@)
463 0 0 if ($VERBOSE)
464 0 0 if ($WWW::Link::Tester::Complex::LOGGING)
467 0 26 if ($WWW::Link::Tester::Complex::DEBUG)
468 0 26 if ($WWW::Link::Tester::Complex::DEBUG)
471 8 18 if ($statusCode =~ /2../) { }
16 2 elsif ($statusCode =~ /3../) { }
2 0 elsif ($statusCode =~ /4../) { }
0 0 elsif ($statusCode =~ /5../) { }
472 0 8 if ($VERBOSE)
474 0 8 if ($new_url ne '') { }
475 0 0 if (exists $WWW::Link::Tester::Complex::url_hash{$new_url}) { }
476 0 0 if ($VERBOSE)
479 0 0 if ($VERBOSE)
487 0 16 if ($VERBOSE)
493 0 16 if ($VERBOSE)
497 0 2 if ($VERBOSE)
501 0 0 if ($VERBOSE)
510 0 0 if ($protocol =~ /^http$/i)
513 0 0 if ($telnetResult ne 'FAIL')
533 0 0 if ($WWW::Link::Tester::Complex::VERBOSE or $WWW::Link::Tester::Complex::DEBUG)
538 0 0 if ($WWW::Link::Tester::Complex::DEBUG)
539 0 0 if $line =~ /^\s$/
540 0 0 if ($line =~ /^Location: \s* (\S+)/x)
541 0 0 if ($WWW::Link::Tester::Complex::DEBUG)
558 0 16 if ($WWW::Link::Tester::Complex::DEBUG)
562 16 0 if ($new_url =~ m[^[a-z]+://]i)
566 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
569 0 0 if ($new_url =~ m[^/]) { }
0 0 elsif ($old_url =~ m[ (\w+://\S+/) ]x) { }
571 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
578 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
583 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
604 0 0 if ($WWW::Link::Tester::Complex::VERBOSE or $WWW::Link::Tester::Complex::DEBUG)
610 0 0 unless open LOGFILE, "+>$WWW::Link::Tester::Complex::TELNET_LOGFILE"
611 0 0 unless ($port and $port =~ /^\d+$/)
620 0 0 unless $telnetAgent
629 0 0 if ($telnetAgent->timed_out)
630 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
637 0 0 unless close LOGFILE
639 0 0 unless (@lines)
640 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
645 0 0 if ($WWW::Link::Tester::Complex::DEBUG)
651 0 0 if ($statusLine =~ m[^(HTTP/\d+\.\d+)[ \t]+(\d+)[ \t]*([^\012]*)\012]) { }
655 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
659 0 0 if ($statusCode =~ /2../) { }
0 0 elsif ($statusCode =~ /3../) { }
0 0 elsif ($statusCode =~ /4.. | 5../x) { }
664 0 0 if ($new_url ne '') { }
665 0 0 if (exists $WWW::Link::Tester::Complex::url_hash{$new_url}) { }
666 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
671 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
681 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
685 0 0 if ($new_url ne '') { }
686 0 0 if (exists $WWW::Link::Tester::Complex::url_hash{$new_url}) { }
687 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
692 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
711 0 0 if ($WWW::Link::Tester::Complex::VERBOSE)
717 0 0 if ($contentStr =~ /