Condition Coverage

blib/lib/CPAN/FTP.pm
Criterion Covered Total %
condition 26 189 13.7


and 3 conditions

line !l l&&!r l&&r condition
26 0 0 0 exists &Errno::EAGAIN and $! == &Errno::EAGAIN
38 7 0 0 defined $ftpstats_size and $ftpstats_size <= 0
125 0 0 0 $fh and defined fileno $fh
135 0 0 0 @{[] unless $fullstats->{'history'};} and @{$fullstats->{'history'};} > $ftpstats_size || $time - $fullstats->{'history'}[0]{'start'} > 86400 * $ftpstats_period
212 38 0 0 $CPAN::Config->{'randomize_urllist'} and rand 1 < $CPAN::Config->{'randomize_urllist'}
323 28 3 7 not defined $CPAN::FTP::connect_to_internet_ok and defined $_
335 38 0 0 -f $aslocal and -r _
38 0 0 -f $aslocal and -r _ and not $force & 1
359 0 0 0 $CPAN::META->has_usable("HTTP::Tiny") and $CPAN::META->has_usable("Net::SSLeay")
0 0 0 $CPAN::META->has_usable("HTTP::Tiny") and $CPAN::META->has_usable("Net::SSLeay") and $CPAN::META->has_usable("IO::Socket::SSL")
408 0 0 0 $CPAN::META->has_usable("HTTP::Tiny") and $proto eq 'http' || $CPAN::META->has_usable('Net::SSLeay') && $CPAN::META->has_usable('IO::Socket::SSL')
427 0 0 0 $res and $res->{'success'}
0 0 0 $res and $res->{'status'} ne 599
0 0 0 $res and $res->{'status'} eq 599
463 0 0 0 defined $dlprg_configured and length $dlprg_configured
548 0 0 0 defined $CPAN::FTP::ThesiteURL and ($ccurllist->[$b] eq $CPAN::FTP::ThesiteURL) <=> ($ccurllist->[$a] eq $CPAN::FTP::ThesiteURL)
588 0 0 38 $scheme and "file" eq $scheme
589 38 0 0 $sitetag && $sitetag eq 'defaultsites' && !@$ccurllist
633 0 0 38 -f $ret and $scheme eq "file"
742 0 0 0 not -f $l and $l =~ m[^/\w:]
746 10 0 28 -f $l and -r _
753 0 0 0 -f $l and -r _
755 0 0 10 -f $ungz and -r _
0 0 0 -f $l and -r _
761 0 0 0 -f $aslocal and -s _
798 0 0 0 $url =~ /^http:/i and $CPAN::META->has_usable("HTTP::Tiny")
844 0 0 0 $res and $res->{'success'}
0 0 0 $res and $res->{'status'} ne 599
0 0 0 $res and $res->{'status'} eq 599
893 0 0 0 "CPAN::FTP"->ftp_get($host, $dir, "$getfile.gz", $gz) and eval { do { "CPAN::Tarzip"->new($gz)->gunzip($aslocal) } }
908 0 0 0 UNIVERSAL::can($ro_url, "text") and $ro_url->{'FROM'} eq "USER"
1093 0 0 0 $ftpbin and length $ftpbin
0 0 0 $ftpbin and length $ftpbin and "MM"->maybe_command($ftpbin)

or 2 conditions

line l !l condition
126 0 0 $fullstats->{'history'} ||= []
134 0 0 $CPAN::Config->{'ftpstats_period'} || 14
204 0 7 $fullstats->{'history'} || []
225 0 38 $with_defaults ||= 0
228 38 0 $CPAN::Config->{'urllist'} ||= []
314 31 7 $force ||= 0
450 0 0 $@ || 'Unknown error'
460 0 0 $CPAN::Config->{'devnull'} || ''
560 30 8 $CPAN::FTP::Themethod ||= ""
868 0 0 $@ || 'Unknown error'
931 0 0 $CPAN::Config->{'devnull'} || ''
1059 0 0 $CPAN::Config->{'no_proxy'} || $ENV{'no_proxy'} || ''
1122 0 0 $mtime ||= 0
1166 0 0 $mtime ||= 0
1204 0 0 $mtime ||= 0

or 3 conditions

line l !l&&r !l&&!r condition
45 0 7 0 $fh ||= "FileHandle"->new
51 0 0 0 $waitstart ||= localtime()
135 0 0 0 @{$fullstats->{'history'};} > $ftpstats_size || $time - $fullstats->{'history'}[0]{'start'} > 86400 * $ftpstats_period
160 0 0 0 $^O eq "MSWin32" or $^O eq "os2"
326 0 0 38 not defined $ph or $ph
359 0 0 0 $CPAN::META->has_usable("HTTP::Tiny") and $CPAN::META->has_usable("Net::SSLeay") and $CPAN::META->has_usable("IO::Socket::SSL") or $CPAN::Config->{'curl'}
0 0 0 $CPAN::META->has_usable("HTTP::Tiny") and $CPAN::META->has_usable("Net::SSLeay") and $CPAN::META->has_usable("IO::Socket::SSL") or $CPAN::Config->{'curl'} or $CPAN::Config->{'wget'}
408 0 0 0 $proto eq 'http' || $CPAN::META->has_usable('Net::SSLeay') && $CPAN::META->has_usable('IO::Socket::SSL')
0 0 0 $CPAN::Config->{'curl'} or $CPAN::Config->{'wget'}
423 0 0 0 $CPAN::Config->{'http_proxy'} || $ENV{'http_proxy'}
0 0 0 $CPAN::Config->{'no_proxy'} || $ENV{'no_proxy'}
526 0 0 8 $CPAN::Config->{'ftp_proxy'} || $ENV{'ftp_proxy'}
528 0 0 8 $CPAN::Config->{'http_proxy'} || $ENV{'http_proxy'}
530 0 0 8 $CPAN::Config->{'no_proxy'} || $ENV{'no_proxy'}
840 0 0 0 $CPAN::Config->{'http_proxy'} || $ENV{'http_proxy'}
0 0 0 $CPAN::Config->{'no_proxy'} || $ENV{'no_proxy'}
1055 2 0 0 $CPAN::Config->{'http_proxy'} || $ENV{'http_proxy'}
1138 0 0 0 $netrc->hasdefault or $netrc->contains($host)
1272 0 0 0 $user{$uid} || $uid
1273 0 0 0 $group{$gid} || $gid