Branch Coverage

blib/lib/HTML/Miner.pm
Criterion Covered Total %
branch 67 154 43.5


line true false branch
348 0 4 if (not $count > 1) { }
357 0 4 unless $parameter_hash{'CURRENT_URL'}
361 0 4 unless $parameter_hash{'CURRENT_URL_HTML'}
364 4 0 unless $parameter_hash{'USER_AGENT'}
366 4 0 unless $parameter_hash{'TIMEOUT'}
369 4 0 unless $parameter_hash{'DEBUG'}
372 4 0 unless $parameter_hash{'ABSOLUTE_ALL_CONTAINED_URLS'}
377 0 4 if ($require_extract)
382 0 0 if $@
432 0 4 if ($$self{'DEBUG'} == 1)
510 3 2 if (UNIVERSAL::isa($tmp, 'HTML::Miner')) { }
530 2 0 if ($html_has_been_passed) { }
540 0 0 if $@
561 139 658 if ($match =~ /title=(\"|\')([^(\"|\')]*?)(\"|\')/is)
571 0 797 if $@
577 797 0 if ($this_abs_url_exists)
583 0 797 if $@
590 0 797 if $@
593 732 65 $domain eq $this_domain ? :
672 2 2 unless (int($number_of_arguments / 2) * 2 == $number_of_arguments)
678 0 4 unless defined $params{'CONVERT_URLS_TO_ABS'}
688 2 2 if (defined $self) { }
689 2 0 if (UNIVERSAL::isa($self, 'HTML::Miner')) { }
704 2 0 defined $params{'HTML'} ? :
707 2 0 if ($html_has_been_passed) { }
717 0 0 if $@
735 4 4 if ($params{'CONVERT_URLS_TO_ABS'})
748 6 6 if ($params{'CONVERT_URLS_TO_ABS'})
791 0 816 if (UNIVERSAL::isa($contained_page_url, 'HTML::Miner'))
804 799 17 if ($possible_relative_url =~ m[http(s)?://])
812 0 799 if ($@) { }
830 0 17 if ($possible_relative_url =~ /^#.+/)
840 0 0 if $@
846 6 11 if ($possible_relative_url =~ m[^/] or $possible_relative_url =~ m[^\./])
855 0 6 if $@
862 2 9 if ($possible_relative_url =~ /^\.\./)
900 0 2 if $@
918 0 9 if ($@) { }
973 1 0 if (UNIVERSAL::isa($tmp, 'HTML::Miner')) { }
1026 0 0 unless $user_agent
1027 0 0 unless $timeout and $timeout != 0
1029 0 0 if (UNIVERSAL::isa($url, 'HTML::Miner'))
1036 0 0 if $@
1043 0 0 if $@
1097 0 0 if (UNIVERSAL::isa($url, 'HTML::Miner'))
1104 0 0 if $@
1111 0 0 if $@
1114 0 0 if ($url =~ /^https/)
1122 0 0 unless $no_http_url =~ m[/]
1126 0 0 unless $user_agent
1127 0 0 unless $timeout and $timeout != 0
1128 0 0 unless $attempts
1144 0 0 if ($response_code == 200 or not $response_code > 299 && $response_code < 400 or $attempts > 7)
1220 1 0 if (UNIVERSAL::isa($tmp, 'HTML::Miner')) { }
1241 0 0 if ($html_has_been_passed) { }
1251 0 0 if $@
1279 4 0 if ($complete_image_link =~ /src=[\'\"](.*?)[\'\"]/is)
1283 3 1 if ($complete_image_link =~ /alt=[\'\"](.*?)[\'\"]/is)
1293 0 4 if $@
1298 4 0 if ($this_abs_url_exists)
1304 0 4 if $@
1306 3 1 $domain eq $this_domain ? :
1394 0 1 unless $tmp[0]
1404 1 0 if (UNIVERSAL::isa($tmp[0], 'HTML::Miner')) { }
1415 0 0 unless ($params{'URL'} or $params{'HTML'})
1421 0 0 unless ($html)
1429 0 0 if $@
1436 0 0 if $@
1461 1 0 if ($head =~ m[(.*?)]sig)
1467 1 0 if ($head =~ m[]is)
1484 3 1 if $tmp
1542 0 0 unless $response->is_success
1566 0 3246 unless $url
1569 675 2571 unless ($url =~ m[/$] or $url =~ m[([^/]/[^/]+\.[^/]+)])
1574 14 3232 unless ($url =~ m[^http://] or $url =~ m[^https://])
1584 3246 0 if ($url =~ m[(\w+)://([^/:]+)(:\d+)?/(.*)]) { }
1593 0 3246 unless $domain_name_for_checkes =~ /[a-z0-9-]+(\.[a-z])+/ or $domain_name_for_checkes =~ /\d+\.\d+\.\d+\.\d+/