Branch Coverage

blib/lib/WWW/URLToys.pm
Criterion Covered Total %
branch 54 746 7.2


line true false branch
428 0 0 unless ($using_tk)
478 0 0 if $config_use_xttitle
501 0 0 unless $warn_on_autorun
525 0 0 if $text =~ /^no$/i
526 0 0 if $text =~ /^yes$/i
553 0 0 if @current_action < 1
571 0 0 if $which =~ /^useragent$/i
572 0 0 if $which =~ /^extensionregex$/i
573 0 0 if $which =~ /^extensionignore$/i
574 0 0 if $which =~ /^customheaders$/i
575 0 0 if $which =~ /^hrefregex$/i
576 0 0 if $which =~ /^imgregex$/i
577 0 0 if $which =~ /^prompt$/i
578 0 0 if $which =~ /^nametemplate$/i
579 0 0 if $which =~ /^SaveURLList$/i
580 0 0 if $which =~ /^ExplainRegexError$/i
581 0 0 if $which =~ /^UseUndo$/i
582 0 0 if $which =~ /^UseXTTitle$/i
583 0 0 if $which =~ /^PauseTime$/i
584 0 0 if $which =~ /^DownloadDir$/i
585 0 0 if $which =~ /^DirSlashes$/i
586 0 0 if $which =~ /^SeqWarningSize$/i
587 0 0 if $which =~ /^Proxy$/i
594 0 0 if (-e $configfile)
599 0 0 if /^#/
601 0 0 if (/^([^=]+)=(.*)$/)
618 0 0 unless open CONFIGFILE, "> $filename"
679 0 0 unless (-d $Dir)
684 0 0 unless $Parent eq ''
701 0 0 if (open $commentptr, $filename)
704 0 0 if $temp =~ /^#\s+(.*)$/
719 0 0 if ($filename =~ m[/([^/.]+)\.u$]i)
734 0 0 if ($which) { }
736 0 0 if ($helplines{$which}) { }
746 0 0 if ($syntax) { }
777 0 0 if ($mylen = length $_) > $maxlen
795 0 0 $target < @data ? :
796 0 0 if ($item + 1) % $cols == 0
798 0 0 if (($item + 1) % $cols == 0)
807 0 0 if (($item + 1) % $cols == 0)
824 0 0 if (defined $nextdirfile)
832 0 0 if (defined $nextdirfileout)
854 0 0 if ($url =~ m[(http://[^/ ]+(?:/[^/]+)*/)(\.\./.+)]i)
867 0 0 unless ($regex)
876 0 0 if ($@)
878 0 0 if ($config_explain_regex_error) { }
907 0 0 if ($header =~ /^(.+): (.+)$/)
921 0 0 if ($domain =~ /$key/)
928 0 0 if ($pwheader)
957 0 0 if length $config_proxy > 0
960 0 0 if $use_cookies
970 0 0 if ($url =~ m[/$]) { }
975 0 0 if ($url =~ m[(http://[^/]+).*$]i)
983 0 0 if ($url =~ m[(http://.+/)[^/?]+\.([^/?&]+)(\?[^/]+)?]i)
989 0 0 if ($url =~ m[(http://[^/]+).*$]i)
1007 0 0 if (not $ext =~ /$config_ext_regex/i) { }
1013 0 0 if ($ext =~ /$config_ext_ignore/i)
1048 0 0 if ($extension)
1052 0 0 if ($se == 1) { }
0 0 elsif ($se == 2) { }
1074 0 0 if ($res->is_success)
1085 0 0 if ($link =~ m[^/]) { }
1092 0 0 unless ($link =~ m[^http://])
1121 0 0 unless test_regex($regex)
1135 0 0 if $stop_getting_links
1140 0 0 if ($link =~ /$makeregex/) { }
1148 0 0 if ($total > 0) { }
1160 0 0 if (@sitelist > 0)
1186 0 0 if $stop_getting_links
1188 0 0 if ($response->is_success)
1191 0 0 if ($resume_spot > 0)
1193 0 0 if ($response->code != 206)
1206 0 0 if ($length < 1) { }
1224 0 0 unless (goodsize($length, $dlsize))
1269 0 0 if $current_k == $length
1294 0 0 if ($url =~ m[http://([^/]+)/((?:[^/]+/)+)?(.+)(?:\?.*)?]i)
1301 0 0 if (length $base_filename > 0)
1303 0 0 if ($base_filename =~ /\.([^.]+)$/)
1321 0 0 if $thour > 12
1324 0 0 if ($urldir)
1359 0 0 if (-e $full_filename) { }
1381 0 0 if (-e $dl_filename)
1389 0 0 if ($completesize < 1) { }
1408 0 0 unless (open OUTPUT, "$openmode $dl_filename")
1417 0 0 if ($resume_spot > 0) { }
1434 0 0 if ($size < 1) { }
0 0 elsif ($file_complete) { }
1461 0 0 if ($ut_get_dir) { }
1478 0 0 if ($config_save_url_list)
1482 0 0 unless (defined *URLLIST)
1491 0 0 if (keys %passwords > 0)
1495 0 0 unless (defined *PWLIST)
1510 0 0 if (keys %headers > 0)
1514 0 0 unless (defined *HDLIST)
1539 0 0 if $stop_getting_links
1549 0 0 if ($config_pausetime)
1557 0 0 unless $stop_getting_links
1571 0 0 unless (-f $url_list_filename)
1579 0 0 unless (defined *resumefile)
1594 0 0 if (-f $pw_list_filename)
1599 0 0 if (defined *PWFILE)
1603 0 0 if (/^(\S+)\s+(.*)$/)
1621 0 0 if (-f $hd_list_filename)
1625 0 0 if (defined *HDFILE)
1629 0 0 if (/^([^: ]+): (.+)$/)
1646 0 0 if (-f $cf_list_filename)
1667 0 0 if $stop_getting_links
1677 0 0 if ($config_pausetime)
1687 0 0 unless $stop_getting_links
1711 0 0 if $stop_getting_links
1720 0 0 if $u =~ /^mailto/i
1721 0 0 if $u =~ m[^nntp://]i
1722 0 0 if ($u =~ m[^ftp://]i)
1729 0 0 unless ($seen{$u})
1736 0 0 if ($extension) { }
1738 0 0 unless (skipext($extension))
1740 0 0 if $u =~ /^$prefix/
1745 0 0 if $u =~ /^$prefix/
1751 0 0 if @l < 1
1767 0 0 if ($useregex) { }
1769 0 0 unless test_regex($tofind)
1787 0 0 if ($useregex) { }
1789 0 0 unless test_regex($tofind)
1809 0 0 $delete_instead ? :
1830 0 0 if $templen > 0
1847 0 0 if ($typedsize =~ /\s*([-+]?)(\d+)([kKbB]?)\s*/)
1850 0 0 if $tcomp eq '-'
1852 0 0 if $tunit =~ /^k$/i
1855 0 0 if ($comparison eq '-') { }
1858 0 0 if ($unit eq 'k') { }
1860 0 0 if $k <= $size
1864 0 0 if $len <= $size
1870 0 0 if ($unit eq 'k') { }
1872 0 0 if $k >= $size
1876 0 0 if $len >= $size
1894 0 0 if ($stop_getting_links)
1902 0 0 if ($len == -1) { }
1914 0 0 if (goodsize($len, $typedsize)) { }
1955 0 0 if $saw{$_} < 2
1968 0 0 if $listcount == 0
1969 0 0 if $count == 0
1971 0 0 if ($count >= $listcount)
1982 0 0 if $i >= $count
1996 0 0 if $count >= $listcount
1997 0 0 if $listcount == 0
1999 0 0 if ($count == 0)
2021 0 0 if $listcount == 0
2022 0 0 if $count == 0
2024 0 0 if ($count >= $listcount)
2045 0 0 if $count >= $listcount
2046 0 0 if $listcount == 0
2048 0 0 if ($count == 0)
2069 0 0 unless (defined $regex)
2074 0 0 if ($#$list < 0)
2083 0 0 if ($entry =~ /$regex/)
2087 0 0 if $stop_getting_links
2096 0 0 unless $amount_to_show
2098 0 0 if ($#$list < 0)
2110 0 0 if $count >= $amount_to_show
2119 0 0 unless $amount_to_show
2123 0 0 if $amount_to_show > $listcount
2125 0 0 if ($#$list < 0)
2147 0 0 unless ($i =~ /^(\D+?)(\d+)(.+)$/)
2156 0 0 unless ($j =~ /^(\D+?)(\d+)(.+)$/)
2165 0 0 unless $iprefix eq $jprefix
2192 0 0 if ($current =~ /^(\D+?)(\d+)(.+)$/) { }
2223 0 0 unless (open LISTFILE, "> $filename")
2244 0 0 unless (-r $filename)
2250 0 0 unless (open LISTFILE, "< $filename")
2288 0 0 if ($url =~ /^(\D+?)(\d+)(.+)$/) { }
2294 0 0 if ($lastprefix and not $lastprefix eq $prefix)
2296 0 0 if ($lasturl)
2322 0 0 if ($line =~ /^[sz]eq\s+(.+)$/)
2325 0 0 if ($url =~ /^(\D+?)(\d+)(.+)$/)
2343 0 0 if ($url =~ /^(\D+?)(\d+)(.+)$/) { }
2351 0 0 if ($d > $config_seq_warning_size)
2357 0 0 if ($leading_zeros) { }
2401 0 0 if (@$list < 1)
2415 0 0 if ($u =~ /^([^\[]+[^\[0-9])(\d+)(.*)$/) { }
2445 0 0 if (not defined $front) { }
2465 0 0 if ($keepgoing)
2467 0 0 if (length $back < length $v)
2472 0 0 if $v =~ /^0/
2476 0 0 if ($keepgoing) { }
2500 0 0 if (@final > 0)
2523 0 0 if (int $1 == int $2)
2541 0 0 unless (open FLUXFILE, "> $filename")
2551 0 0 if (/\[\d+-\d+\]/) { }
2563 0 0 if @answer < 1
2573 0 0 unless ($url)
2580 0 0 if ($url =~ s/^[\[]//) { }
0 0 elsif ($url =~ s/^{//) { }
2583 0 0 unless $url =~ s/^([0-9a-z]+-[0-9a-z]+)]//
2594 0 0 unless $url =~ s/^([^}]+)}//
2609 0 0 unless $fromstdin
2619 0 0 unless $fromstdin
2621 0 0 if ($pulledfromundo) { }
2642 0 0 if (@history < 1)
2654 0 0 if ($count)
2656 0 0 if $n >= $count
2668 0 0 unless (open HISTORYFILE, "> $filename")
2680 0 0 if ($count)
2682 0 0 if $n >= $count
2715 0 0 if $thour > 12
2732 0 0 if ($config_useundo)
2755 0 1 if (@params > 0)
2770 0 1 if (/^$/)
2771 0 1 if (/^#/)
2772 0 1 if (/^\s+$/)
2774 0 1 if (/^exit$/i)
2776 0 0 if ($win32) { }
0 1 if (/^clear$/i)
2777 0 0 if ($win32) { }
0 1 if (/^cls$/i)
2779 0 0 if test_regex($r)
0 1 if (/^show(?: (.+))?$/i)
2780 0 0 if test_regex($r)
0 1 if (/^list(?: (.+))?$/i)
2781 0 0 if test_regex($r)
0 1 if (/^ls(?: (.+))?$/i)
2783 0 1 if (/^head(?: (.+))?$/i)
2784 0 1 if (/^tail(?: (.+))?$/i)
2786 0 1 if (/^history\s+show(?:\s+)?$/i)
2792 0 1 if (/^history\s+show\s+(\d+)$/i)
2799 0 1 if (/^history\s+save(?:\s+)?$/i)
2805 0 1 if (/^history\s+save\s+(\S.*)\s+(\d+)$/i)
2813 0 1 if (/^history\s+save\s+(\S.*)$/i)
2820 0 1 if (/^history\s+clear/i)
2826 0 1 if (/^history(?:\s+)?$/i)
2832 0 1 if (/^keep(?:\s+)?$/i)
2833 0 1 if (/^keep (.+)$/i)
2837 0 0 if (test_regex($regex))
2847 0 1 if (/^size(?:\s+)?$/i)
2848 0 1 if (/^size (.+)$/i)
2860 0 1 if (/^needparam$/i)
2861 0 1 if (/^needparam\s+(\d+)(?:\s+(.*))?$/i)
2866 0 0 if (@params < 1) { }
2873 0 0 unless ($$p[$which])
2883 0 1 if (/^batch(?:\s+)?$/i)
2884 0 1 if (/^batch (.+)$/i)
2899 0 1 if (/^batchcurrent(?:\s+)?$/i)
2900 0 1 if (/^batchcurrent (.+)$/i)
2915 0 1 if (/^keeph/)
2917 0 0 if (/^keeph\s+(\d+)\s*$/) { }
2933 0 1 if (/^delh/)
2935 0 0 if (/^delh\s+(\d+)\s*$/) { }
2951 0 1 if (/^keept/)
2953 0 0 if (/^keept\s+(\d+)\s*$/) { }
2969 0 1 if (/^delt/)
2971 0 0 if (/^delt\s+(\d+)\s*$/) { }
2987 0 1 if (/^del(?:\s+)?$/i)
2988 0 1 if (/^del (.+)$/i)
2992 0 0 if (test_regex($regex))
3002 0 1 if (/^replace(?:\s+)?$/i)
3003 0 1 if (/^replace\s+(\S+)\s+(\S+)$/i)
3012 0 1 if (/^rreplace(?:\s+)?$/i)
3013 0 1 if (/^rreplace\s+(.*)$/i)
3018 0 0 if (m[^s?/(.*)(?
3030 0 1 if (/^password(?:\s+)?$/i)
3031 0 1 if (/^password\s+clear\s*$/i)
3036 0 1 if (/^password\s+show\s*$/i) { }
0 1 elsif (/^password\s+(\S+)\s+(\S+)\s+(\S+)\s*$/i) { }
3040 0 0 if (not @keys) { }
3072 0 1 if (/^strip(?:\s+)?$/i)
3073 0 1 if (/^strip\s+(.*)$/i)
3082 0 1 if (/^u$/i or /^undo\s*$/)
3089 0 1 if (/^nodupes$/i)
3099 0 1 if (/^spider$/i)
3111 0 1 if (/^keepuni$/i)
3122 0 1 if (/^fusk(?:\s+)?$/i)
3123 0 1 if (/^fusker(?:\s+)?$/i)
3124 0 1 if (/^fusk(?:er)? (.+)$/i)
3135 0 0 if @fusklist
3143 0 1 if (/^lip$/i)
3155 1 0 if (/^ver/i)
3162 0 0 if (/^seq(?:\s+)?$/i)
3163 0 0 if (/^seq (.+)$/i)
3180 0 0 if (/^cd(?:\s+)?$/i)
3181 0 0 if (/^cd\s+(.+)$/i)
3192 0 0 if (/^header(?:\s+)?$/i)
3195 0 0 if (%headers > 0) { }
3211 0 0 if (/^header\s+(.+)$/i)
3217 0 0 if ($newheader =~ /^\s*([^ \t:]+):?\s+(.*)$/)
3220 0 0 if ($which =~ /^-d$/) { }
3233 0 0 if (/^pwd(?:\s+)?$/i)
3241 0 0 if (/^zeq(?:\s+)?$/i)
3242 0 0 if (/^zeq (.+)$/i)
3261 0 0 if (m[^(http://[^ <>]+)$]i)
3274 0 0 if (/^sort$/i)
3284 0 0 if (/^nsort$/i)
3295 0 0 if (/^system(?:\s+)?$/i)
3296 0 0 if (/^system (.+)$/i)
3307 0 0 if (/^systemw(?:\s+)?$/i)
3308 0 0 if (/^systemw (.+)$/i)
3314 0 0 if $win32
3319 0 0 if (/^systemu(?:\s+)?$/i)
3320 0 0 if (/^systemu (.+)$/i)
3326 0 0 unless $win32
3331 0 0 if (/^add(?:\s+)?$/i)
3332 0 0 if (/^add (.+)$/i)
3344 0 0 if (/^save(?:\s+)?$/i)
3345 0 0 if (/^save (.+)$/i)
3356 0 0 if (/^saveflux(?:\s+)?$/i)
3357 0 0 if (/^saveflux (.+)$/i)
3368 0 0 if (/^load(?:\s+)?$/i)
3369 0 0 if (/^load (.+)$/i)
3381 0 0 if (/^append(?:\s+)?$/i)
3382 0 0 if (/^append (.+)$/i)
3395 0 0 if (/^title\s*$/)
3396 0 0 if (/^title (.+)$/i)
3404 0 0 if (/^print$/i)
3405 0 0 if (/^print (.*)$/i)
3413 0 0 if (/^href$/i)
3423 0 0 if (/^img$/i)
3433 0 0 if (/^hrefimg$/i)
3443 0 0 if (/^fixparents$/i)
3453 0 0 if (/^config(?: +)?$/i)
3459 0 0 if (/^config\s+save\s*$/i)
3470 0 0 if (/^set$/i)
3476 0 0 if (/^config\s+load\s*$/i)
3486 0 0 if (/^makeregex(?: (.+))?$/i)
3488 0 0 if (defined $1) { }
3490 0 0 if (test_regex($1))
3503 0 0 if (/^make(?: (.+))?$/i)
3507 0 0 if (defined $1) { }
3510 0 0 if (test_regex($new_regex))
3520 0 0 if (test_regex($config_href_regex))
3532 0 0 if (/^resume(?:\s+)?$/i)
3533 0 0 if (/^resume (.+)$/i)
3545 0 0 if (/^get$/i)
3555 0 0 if (/^get\s+(.+)$/i)
3566 0 0 if (/^help\s+(\S+)(?:\s+(?:.*))?$/i)
3567 0 0 if (/^h\s+(\S+)(?:\s+(?:.*))?$/i)
3569 0 0 if (/^help(?:\s+)?$/i)
3570 0 0 if (/^h(?:\s+)?$/i)
3573 0 0 if (/^set ([^=]+)=(.*)$/)
3583 0 0 if (/^cookies(?:\s+)?$/i)
3585 0 0 if ($use_cookies) { }
3597 0 0 if (length $cookiestring > 0) { }
3608 0 0 if (/^cookies (.+)$/i)
3614 0 0 if $cmd =~ /^on/
3615 0 0 if $cmd =~ /^off/
3616 0 0 if $cmd =~ /^clear/
3621 0 0 if (/^autorun(?:\s+)?$/i)
3622 0 0 if (/^autorun (.+)$/i)
3633 0 0 if (open $cmdfileptr, $fluxfile)
3647 0 0 if /^\s*system/i
3648 0 0 if /^\s*cd/i
3649 0 0 if /^\s*config/i
3650 0 0 if /^\s*set/i
3651 0 0 if /^\s*spider/i
3653 0 0 if ($w)
3665 0 0 if ($seqcount > 30000)
3671 0 0 if ($warn)
3673 0 0 unless cb('warnuser', \@warnlist, 0)
3677 0 0 if ($docmd)
3697 0 0 if (/^(\S+)/)
3704 0 0 if (-e $cmdfile)
3738 0 0 if (-t $htr) { }
3741 0 0 unless $ut_term
3743 0 0 unless defined $text
3744 0 0 unless $text
3765 0 0 if ($cmd =~ /~/) { }
3797 0 0 if (/^end$/i) { }
0 0 elsif (/^exit$/i) { }
0 0 elsif (/^quit$/i) { }
3811 0 0 unless (/^\s*$/)
3817 0 0 if ($handletoread == *STDIN)
3819 0 0 if (-t *STDIN)
3830 0 0 if ($cmd =~ /~/) { }
3870 0 0 if ($fluxvarupdate)
3874 0 0 if ($fluxlines > 0) { }
3884 0 0 unless (ut_exec_command($_, $utlist))