Branch Coverage

blib/lib/lib/http.pm
Criterion Covered Total %
branch 3 260 1.1


line true false branch
80 0 1 if (@_ == 1)
81 0 0 if ($_[0] eq 'unlink_tmpfile') { }
0 0 elsif ($_[0] =~ /debug/i) { }
94 0 1 if @bases
102 0 0 unless ($INC_LIB{$uri}++)
109 0 0 if (scalar get_head($uri_ver) and not $INC_LIB{$uri_ver}++)
124 0 0 unless ($TMPDIR)
126 0 0 if (-d $STATIC_TMPDIR_i)
132 0 0 unless ($TMPDIR)
134 0 0 if ($tmp and -d $tmp)
138 0 0 unless $tmp =~ m[[\\/]$]
141 0 0 if (-d $tmp)
153 0 0 if $INC_i == \&hook
154 0 0 if $INC_i eq $TMPDIR
157 0 0 unless $hash_hook
158 0 0 unless $has_lib
160 0 0 unless $SIG{'INT'}
170 0 0 if $ENABLE_GZIP
175 0 0 if (not $@ and defined &Compress::Zlib::memGunzip)
177 0 0 if $lib::http::DEBUG
188 0 0 if $FIND_IDX
207 0 0 if ($fl_size)
210 0 0 if ($code == 200 and $fl_size == $length and $mdf_time >= $modf)
218 0 0 unless ($idx)
220 0 0 if $ENABLE_GZIP
221 0 0 unless $idx
223 0 0 if ($idx)
232 0 0 if $idx
275 0 0 if ref $fl
276 0 0 if $fl
319 0 0 if (%LIBS_IDX and $LIBS_IDX{'dirs'}{"$inc_base$dir"})
321 0 0 if not $LIBS_IDX{$Key} or $Key =~ /\.gz$/ or not $Key =~ /^\Q$inc_base$dir\E/
322 0 0 if ($inc_base =~ /^\Q$LIBS_IDX{'libs'}{$Key}[0]\E/ and $Key =~ /^\Q$inc_base\E(.*)/)
328 0 0 unless (@files)
331 0 0 if $inc_base =~ /^\Q$Key\E/i
333 0 0 unless $has_lib_idx
338 0 0 if ($files_i =~ m[/$]) { }
342 0 0 unless $files_i =~ /\.pm$/
360 0 0 if ($files_i =~ m[/$]) { }
380 0 0 unless $dir
402 0 0 if not $links_i =~ m[(?:\w|/)$] or $links_i =~ m[^(?:mailto:|\?|/)]
431 0 0 if time - $URLS{$uri}{'t'} < 60 and $URLS{$uri}{'status'} == 404
433 0 0 $TMPDIR =~ m[[\\/]$] ? :
438 0 0 if (-s $new_file and $LIBS_IDX{$uri})
442 0 0 if $uri =~ /^\Q$Key\E/i
445 0 0 if $LIBS_IDX{$uri} == $fl_size and $idx_time
449 0 0 if $code == 200 and $fl_size == $length and $mdf_time >= $modf
450 0 0 if $code != 200
455 0 0 if ($ACCEPT_GZIP and not $uri =~ m[(?:\.gz|/)$]i)
457 0 0 if (%LIBS_IDX and $LIBS_IDX{$uri_gz})
459 0 0 if $code != 200
463 0 0 if ($data eq '' and %LIBS_IDX)
466 0 0 if $uri =~ /^\Q$Key\E/i
468 0 0 if $has_lib_idx and not $LIBS_IDX{$uri}
473 0 0 if $data eq ''
476 0 0 if ($data eq '' or $code != 200) { }
484 0 0 if (is_file_hidden(undef, $data))
503 0 0 unless -s $new_file
513 0 0 if %LIBS_IDX and $LIBS_IDX{'lib'}{$LIBS_IDX{'libs'}{$_[0]}[0]} and not $LIBS_IDX{$_[0]}
526 0 0 if not $force and time - $URLS{$url}{'t'} < 60 and $URLS{$url}{'status'} == 404 || $url =~ m[/$]
531 0 0 unless ($host =~ /\w/s)
533 0 0 if ($port eq '' or $port == 0 or not $port =~ /^[\d]+$/)
534 0 0 if ($path eq '')
540 0 0 if $socket
543 0 0 $head ? :
546 0 0 if $port != 80
548 0 0 $ACCEPT_GZIP ? :
572 0 0 if ($lib::http::DEBUG)
587 0 0 if ($modf =~ /,\s+\d+[\s-]+\w+[\s-]+\d+\s+\d+[:-]\d+[:-]\d+/i) { }
589 0 0 unless $mon =~ /^\d+$/
593 0 0 if ($ACCEPT_GZIP and $headers =~ /Content-Encoding:\s*gzip/is || $path =~ /\.gz$/i)
600 0 0 if $code != 200
602 0 0 $head ? :
0 0 if wantarray
604 0 0 if $code != 200
606 0 0 if $head
621 0 0 unless socket SOCK, 2, 1, $proto
623 0 0 unless connect SOCK, $paddr
641 0 0 if (not $year or $year eq '*' or $year < $year_0)
644 0 0 if (is_leap_year($year))
646 0 0 if (not $mon or $mon eq '*') { }
0 0 elsif ($mon < 1 or $mon > 12) { }
0 0 elsif (not $day or $day eq '*') { }
0 0 elsif ($day < 1 or $day > 31) { }
0 0 elsif ($mon == 2 and $day > 28) { }
0 0 elsif ($day > check_date($mon)) { }
652 0 0 unless check_date($year, $mon, $day)
656 0 0 if ($hour eq '') { }
0 0 elsif ($hour eq '*') { }
0 0 elsif ($hour == 24) { }
0 0 elsif ($hour < 0 or $hour > 24) { }
661 0 0 if ($min eq '') { }
0 0 elsif ($min eq '*') { }
0 0 elsif ($min == 60) { }
0 0 elsif ($min < 0 or $min > 60) { }
666 0 0 if ($sec eq '') { }
0 0 elsif ($sec eq '*') { }
0 0 elsif ($sec == 60) { }
0 0 elsif ($sec < 0 or $sec > 60) { }
678 0 0 if (is_leap_year($y))
686 0 0 if ($year_bisexto == 1 and $mon > 2)
704 0 0 if ($year == 0) { }
0 0 elsif ($year % 4000 == 0) { }
0 0 elsif ($year % 400 == 0) { }
0 0 elsif ($year % 100 == 0) { }
0 0 elsif ($year % 4 == 0) { }
717 0 0 unless $_[0] =~ /^\d+$/
721 0 0 if ($#_ == 2)
722 0 0 if ($#_ == 1)
723 0 0 if ($#_ == 0)
725 0 0 if ($#_ > 0) { }
0 0 elsif ($#_ == 0) { }
726 0 0 if ($year eq '')
727 0 0 if ($month eq '')
728 0 0 if ($day eq '')
732 0 0 if (is_leap_year($year))
734 0 0 if ($day <= $months_days[$month]) { }
738 0 0 if ($month eq '')
754 0 0 if (-e $file)
762 0 0 if ($$data_ref =~ /(?:^|\r\n?|\n)[ \t]*#[ \t#]*lib:*http[ \t]*=>[ \t]*hidden_?file\s/is)
776 1 0 if ($_[0])
807 0 0 unless $dir_list_i
808 0 0 if (-d $dir_list_i and -w $dir_list_i and -r $dir_list_i)
814 0 0 if (not $tmpdir and -w '.')
820 0 0 if -d $dir and -w $dir
837 0 0 if ($path[0] =~ /^\w+:$/)
843 0 0 if -e $path
865 0 0 if ($filename ne '.' and $filename ne '..')
867 0 0 if -d $file
888 0 0 if $lib::http::DEBUG