Condition Coverage

lib/CPAN.pm
Criterion Covered Total %
condition 213 647 32.9


and 3 conditions

line !l l&&!r l&&r condition
263 0 0 124 $term and $term->can('ornaments')
677 1 0 0 -f $lockfile and -M _ > 0
683 0 0 0 defined $otherpid and $otherpid
686 0 0 0 defined $otherhost and $otherhost
690 0 0 0 defined $otherhost and defined $thishost
0 0 0 defined $otherhost and defined $thishost and $otherhost ne ''
0 0 0 defined $otherhost and defined $thishost and $otherhost ne '' and $thishost ne ''
0 0 0 defined $otherhost and defined $thishost and $otherhost ne '' and $thishost ne '' and $otherhost ne $thishost
0 0 0 defined $otherpid and $otherpid
865 0 0 0 defined $component and $component
953 123 0 6 defined $message and $message eq 'no'
1008 0 0 0 defined $$Config{'gpg'} and $$Config{'gpg'} =~ /\S/
1058 0 7 1 $ineval and not $End
1113 0 0 8 defined $env and length $env
1527 0 0 0 defined $o_what[0] and $o_what[0] =~ /help/i
1531 0 0 0 $what =~ s/^-// and exists $CPAN::DEBUG{$what}
1811 0 0 3 $what and $what =~ /^[aru]$/
1886 1 0 0 $COLOR_REGISTERED and $CPAN::META->has_inst('Term::ANSIColor')
1 0 0 $COLOR_REGISTERED and $CPAN::META->has_inst('Term::ANSIColor') and $module->description
1957 4 5 18 $only_id and $only_id != ($$d{$nosayer}->can('commandid') ? $$d{$nosayer}->commandid : $CPAN::CurrentCommandId)
2257 863 0 0 $colorize_output and not $CPAN::META->has_inst('Term::ANSIColor')
2505 0 0 2 $pragma and $] < 5.00303 || $obj->can($pragma)
2514 0 18 6 $] >= 5.00303 and $obj->can('called_for')
2582 2 0 0 $USER and $PASSWD
2596 0 0 1 defined $$CPAN::Config{'proxy_user'} and defined $$CPAN::Config{'proxy_pass'}
2615 0 0 1 defined $$CPAN::Config{'username'} and defined $$CPAN::Config{'password'}
2797 33 0 1 -f $aslocal and -r _
33 1 0 -f $aslocal and -r _ and not $force & 1
2871 0 0 0 defined $ThesiteURL and ($$CPAN::Config{'urllist'}[$b] eq $ThesiteURL) <=> ($$CPAN::Config{'urllist'}[$a] eq $ThesiteURL)
2976 0 0 0 not -f $l and $l =~ m[^/\w:]
2980 9 0 25 -f $l and -r _
2986 0 0 9 -f $ungz and -r _
3001 0 0 0 $ro_url->can('text') and $$ro_url{'FROM'} eq 'USER'
3026 0 0 0 $res->is_success and 'CPAN::Tarzip'->new("$aslocal.gz")->gunzip($aslocal)
3072 0 0 0 'CPAN::FTP'->ftp_get($host, $dir, "$getfile.gz", $gz) and 'CPAN::Tarzip'->new($gz)->gunzip($aslocal)
3192 0 0 0 -f $asl_ungz and -s _ == 0
3204 0 0 0 ($wstatus = system($system)) == 0 and -s $asl_gz
3244 0 0 0 $ftpbin and length $ftpbin
0 0 0 $ftpbin and length $ftpbin and 'MM'->maybe_command($ftpbin)
3519 0 0 0 length $perlret[0] and length $perlret[0] >= $i
3606 0 0 0 @words == 2 and $word
3617 0 0 0 @words == 2 and length $word
3647 0 0 1790 $_ and $_ > 0.001
3662 3 0 1787 $LAST_TIME + $$CPAN::Config{'index_expire'} * 86400 > $time and not $force
3725 9 0 0 -f $abs_wanted and -M $abs_wanted < $$CPAN::Config{'index_expire'}
9 0 0 -f $abs_wanted and -M $abs_wanted < $$CPAN::Config{'index_expire'} and not $force & 1
3754 0 0 6 $userid and $fullname
0 0 6 $userid and $fullname and $email
3878 24 0 0 $mod eq 'CPAN' and not 'CPAN::Queue'->exists('Bundle::CPAN') || 'CPAN::Queue'->exists('CPAN')
4038 2 0 0 -r $metadata_file and -f $metadata_file
4126 0 0 35 defined $todir and length $todir
4531 12 95 0 exists $$self{'incommandcolor'} and $$self{'incommandcolor'} == $color
4625 0 20 0 $CPAN::Frontend->myprint(join('', map({" $_\n";} @e))) and return
4719 0 0 7 @readdir == 1 and -d $readdir[0]
4778 0 0 0 $rv != Module::Signature::SIGNATURE_OK() and $rv != Module::Signature::SIGNATURE_MISSING()
4888 0 0 0 $state eq 'poddir' and /^=head\d\s+(\S+)/
5152 0 0 0 $CPAN::Frontend->myprint(join('', map({" $_\n";} @e))) and return
5226 0 0 0 $CPAN::META->has_inst('Module::Signature') and 'Module::Signature'->VERSION >= 0.26
5370 0 1 0 $method and $method =~ /make|test|install/
5397 20 0 0 $self->cpan_comment and $self->cpan_comment =~ /isa_perl\(.+?\)/
5436 0 0 0 $self->called_for ne $self->id and not $$self{'force_update'}
5476 19 0 0 exists $$self{'signature_verify'} and $$self{'signature_verify'}->can('failed') ? $$self{'signature_verify'}->failed : $$self{'signature_verify'} =~ /^NO/
5484 11 6 2 exists $$self{'writemakefile'} and $$self{'writemakefile'}->can('failed') ? $$self{'writemakefile'}->failed : $$self{'writemakefile'} =~ /^NO/
5503 19 0 0 exists $$self{'later'} and length $$self{'later'}
5517 0 12 0 $CPAN::Frontend->myprint(join('', map({" $_\n";} @e))) and return
5560 0 0 0 $Config::Config{'d_alarm'} and $Config::Config{'d_alarm'} eq 'define'
5802 19 0 105 exists $$self{'prereq_pm_detected'} and $$self{'prereq_pm_detected'}
5810 0 0 0 ref $req eq 'HASH' and %$req
5824 0 0 0 $k =~ /[A-Za-z]/ and $v =~ /[A-Za-z]/
0 0 0 $k =~ /[A-Za-z]/ and $v =~ /[A-Za-z]/ and $CPAN::META->exists('Module', $v)
5841 0 0 0 $$yaml{'build_requires'} and ref $$yaml{'build_requires'}
0 0 0 $$yaml{'build_requires'} and ref $$yaml{'build_requires'} and ref $$yaml{'build_requires'} eq 'HASH'
5860 3 0 3 -f $makefile and $fh = 'FileHandle'->new("<$makefile\000")
5920 3 1 2 -f 'Build.PL' and not -f 'Makefile.PL'
4 0 2 -f 'Build.PL' and not -f 'Makefile.PL' and not exists $$req{'Module::Build'}
5959 2 9 0 exists $$self{'make'} and $$self{'make'}->can('failed') ? $$self{'make'}->failed : $$self{'make'} =~ /^NO/
5971 11 0 0 exists $$self{'later'} and length $$self{'later'}
5974 0 2 0 $CPAN::Frontend->myprint(join('', map({" $_\n";} @e))) and return
6012 9 0 0 $$CPAN::Config{'test_report'} and $CPAN::META->has_inst('CPAN::Reporter')
6045 6 1 5 exists $$self{'make_clean'} and $$self{'make_clean'} eq 'YES'
6047 0 5 0 $CPAN::Frontend->myprint(join('', map({" $_\n";} @e))) and return
6122 1 0 0 exists $$self{'make'} and $$self{'make'}->can('failed') ? $$self{'make'}->failed : $$self{'make'} =~ /^NO/
6130 1 0 0 exists $$self{'make_test'} and $$self{'make_test'}->can('failed') ? $$self{'make_test'}->failed : $$self{'make_test'} =~ /^NO/
6156 1 0 0 exists $$self{'later'} and length $$self{'later'}
6159 0 1 0 $CPAN::Frontend->myprint(join('', map({" $_\n";} @e))) and return
6173 0 0 0 exists $CPAN::HandleConfig::keys{'mbuild_install_build_command'} && $$CPAN::Config{'mbuild_install_build_command'}
6208 0 0 0 $makeout =~ /permission/s and $> > 0
0 0 0 $makeout =~ /permission/s and $> > 0 and !$$CPAN::Config{'make_install_make_command'} || $$CPAN::Config{'make_install_make_command'} eq $$CPAN::Config{'make'}
6260 0 0 0 $CPAN::DEBUG and $out
6465 6 6 0 exists $$self{'incommandcolor'} and $$self{'incommandcolor'} == $color
6498 0 24 1 $inst_file and 'CPAN::Version'->vlt($self->inst_version, $self->cpan_version)
6651 36 0 0 $obj->isa('CPAN::Bundle') and exists $$obj{'install_failed'}
36 0 0 $obj->isa('CPAN::Bundle') and exists $$obj{'install_failed'} and ref $$obj{'install_failed'} eq 'HASH'
6667 36 0 0 $$obj{'install'} && $$obj{'install'} eq 'YES'
6801 48 78 0 exists $$self{'incommandcolor'} and $$self{'incommandcolor'} == $color
6803 24 72 30 $depth >= 1 and $self->uptodate
6826 54 0 0 $CPAN::Shell::COLOR_REGISTERED and $CPAN::META->has_inst('Term::ANSIColor')
54 0 0 $CPAN::Shell::COLOR_REGISTERED and $CPAN::META->has_inst('Term::ANSIColor') and $self->description
6884 0 1 2 $ro and $$ro{'statd'}
6960 1 0 0 $$dist{'build_dir'} and -f($mff = 'File::Spec'->catfile($$dist{'build_dir'}, 'MANIFEST'))
1 0 0 $$dist{'build_dir'} and -f($mff = 'File::Spec'->catfile($$dist{'build_dir'}, 'MANIFEST')) and $mfh = 'FileHandle'->new($mff)
6978 0 0 0 length $lfre > 5 and not $lfl
7001 2 0 1 exists $$self{$item} and @{$$self{$item};}
7050 52 12 250 $ro and defined $$ro{'CPAN_FILE'}
7060 0 0 12 defined $fullname and defined $email
7129 0 37 1 $pack->can('unforce') and exists $$self{'force_update'}
7130 0 32 6 $pack->can('unnotest') and exists $$self{'notest'}
7168 123 0 41 $inst_file and not 'CPAN::Version'->vgt($latest, $have)
7182 1 0 0 $self->uptodate and not exists $$self{'force_update'}
7194 0 1 0 $ro and $$ro{'stats'}
1 0 0 $ro and $$ro{'stats'} and $$ro{'stats'} eq 'a'
7212 228 16 0 @packpath == 1 and $packpath[0] eq 'readline.pm'
7244 45 0 0 $] < 5.00303 and $ExtUtils::MakeMaker::VERSION < 5.38

or 2 conditions

line l !l condition
115 0 1 shift @_ || ''
116 0 1 $CurrentCommandId ||= 1
299 0 0 $$Config{'yaml_module'} || 'YAML'
837 14 5 $$Config{'getcwd'} || 'cwd'
885 636 0 $id ||= ''
957 3 6 $$META{'dontload_hash'}{$mod} ||= 1
1035 1067 0 $id ||= ''
1076 1 0 $$Config{'histsize'} || 100
1108 8 1 $$self{'is_tested'} ||= {}
1257 1 0 $$CPAN::Config{'scan_cache'} || 'atstart'
1497 67 0 $o_type ||= ''
1604 1 0 $command ||= ''
1684 0 0 $CPAN::Config ||= {}
1784 0 0 $stems{$stem} ||= []
1861 0 1 $seen{$file} ||= 0
2286 0 0 eval {
2335 0 710 $$CPAN::Config{'colorize_print'} || 'bold blue on_white'
2346 0 23 $$CPAN::Config{'colorize_warn'} || 'bold red on_white'
2352 0 2 $$CPAN::Config{'colorize_warn'} || 'bold red on_white'
2366 0 0 $$CPAN::Config{'colorize_print'} || 'bold blue on_white'
2367 0 0 eval {
2767 20 14 $force ||= 0
2862 34 0 $$CPAN::Config{'urllist'} ||= []
2885 32 2 $Themethod ||= ''
3098 0 0 $$CPAN::Config{'devnull'} || ''
3272 0 0 $mtime ||= 0
3315 0 0 $mtime ||= 0
3353 0 0 $mtime ||= 0
3460 0 0 $mode ||= 0
3535 0 0 $word ||= ''
3536 0 0 $line ||= ''
3537 0 0 $pos ||= 0
3601 0 0 $word ||= ''
3612 0 0 $word ||= ''
3656 0 2 $$CPAN::META{'PROTOCOL'} ||= '1.0'
4104 8 0 $$ro{'CPAN_USERID'} || 'N/A'
4173 7 38 $$CPAN::META{'readonly'}{$class}{$self->id} ||= {}
4307 2 1 shift @_ || ''
4308 0 3 shift @_ || 0
4432 198 0 $$cksum{$f}{'size'} || 0
198 0 $$cksum{$f}{'mtime'} || '---'
4526 96 11 shift @_ || 0
4527 54 53 shift @_ || 0
4528 96 11 shift @_ || []
4862 0 0 $self->called_for || 'unknown'
5054 0 0 $ENV{'CPAN_SHELL_LEVEL'} || 0
5130 0 0 $$CPAN::Config{'pager'} || 'cat'
5150 0 8 $$self{'CHECKSUM_STATUS'} ||= ''
5223 1 8 $sloppy ||= 0
5495 2 0 $err ||= 'Had some problem writing Makefile'
5655 11 0 $$CPAN::Config{'make'} || $Config::Config{'make'} || 'make'
5663 0 0 $$CPAN::Config{'make'} || $Config::Config{'make'} || 'make'
5910 0 0 $$yaml{'requires'} || {}
5911 0 0 $$yaml{'build_requires'} || {}
5967 0 11 $$self{'badtestcnt'} ||= 0
5998 0 0 $ENV{'PERLLIB'} || ''
6277 0 0 $$CPAN::Config{'lynx'} || undef
6343 0 0 $$CPAN::Config{'pager'} || 'cat'
6459 0 12 shift @_ || 0
6460 6 6 shift @_ || 0
6461 0 12 shift @_ || []
6495 25 0 $self->inst_file || ''
6728 0 1 $$self{'badtestcnt'} ||= 0
6796 102 24 shift @_ || 0
6797 62 64 shift @_ || 0
6798 102 24 shift @_ || []
7003 2 1 $local_file || '(not installed)'
7153 0 10 $$self{'badtestcnt'} ||= 0
7161 164 0 $latest ||= 0
7247 45 0 'MM'->parse_version($parsefile) || 'undef'

or 3 conditions

line l !l&&r !l&&!r condition
113 0 1 0 shift @_ || 'CPAN::Prompt'->new
121 1 0 0 not $term or $term->ReadLine eq 'Term::ReadLine::Stub'
249 0 0 0 $META->has_inst('Term::ReadLine::Gnu') or $META->has_inst('Term::ReadLine::Perl')
266 1 2 121 not defined $last_term_ornaments or $_ != $last_term_ornaments
858 0 0 0 $perl ||= $candidate
953 6 3 120 defined $message and $message eq 'no' or $dont{$mod}
1008 0 0 0 eval {
1038 0 53 0 $$META{'readwrite'}{$class}{$id} ||= $class->new('ID', $id)
1164 1 0 0 $dir ||= $$self{'ID'}
1171 1 1 0 $_ eq '.' or $_ eq '..'
1285 0 0 0 $e eq '..' or $e eq '.'
1680 0 0 0 $INC{'CPAN/MyConfig.pm'} || 'File::Spec'->catfile(split(m[/], "$home/.cpan/CPAN/MyConfig.pm", 0))
1990 1 0 12 not $only_id or not $silent
2505 0 2 0 $] < 5.00303 || $obj->can($pragma)
2832 0 0 2 $$CPAN::Config{'ftp_proxy'} || $ENV{'ftp_proxy'}
2834 0 0 2 $$CPAN::Config{'http_proxy'} || $ENV{'http_proxy'}
2850 0 0 2 $$CPAN::Config{'no_proxy'} || $ENV{'no_proxy'}
3287 0 0 0 $netrc->hasdefault or $netrc->contains($host)
3421 0 0 0 $user{$uid} || $uid
3422 0 0 0 $group{$gid} || $gid
3722 9 0 0 $localname ||= $wanted
3878 0 0 0 'CPAN::Queue'->exists('Bundle::CPAN') || 'CPAN::Queue'->exists('CPAN')
3924 16 0 8 $id->cpan_file ne $dist or $id->cpan_version ne $version
3928 0 16 0 $id->userid || $self->userid($dist)
4043 0 0 0 not $cache or ref $cache ne 'HASH'
4067 0 0 0 $$CPAN::META{'readwrite'}{$class}{$id} ||= $class->new('ID', $id, 'RO', $ro)
4082 0 0 0 $$CPAN::META{'PROTOCOL'} ||= $$cache{'PROTOCOL'}
4369 0 0 0 $force ||= $stat[9] + $$CPAN::Config{'index_expire'} * 86400 <= time
4463 43 5 187 $s =~ tr[/][] == 1 or not $s =~ m[[A-Z]/[A-Z-]{2}/[A-Z-]{2,}/]
4671 6 1 0 $$CPAN::META{'cachemgr'} ||= 'CPAN::CacheMgr'->new
5044 0 0 0 $dir ||= $self->dir
5079 0 0 0 $$CPAN::Config{'cvsroot'} || $ENV{'CVSROOT'}
5081 0 0 0 $$CPAN::Config{'cvs_site_perl'} || $ENV{'CVS_SITE_PERL'}
5252 0 0 9 not ref $cksum or ref $cksum ne 'HASH'
5469 0 0 19 not $$self{'archived'} or $$self{'archived'} eq 'NO'
5472 0 0 19 not $$self{'unwrapped'} or $$self{'unwrapped'} eq 'NO'
5615 3 3 0 -f 'Makefile' or -f 'Build'
5645 0 0 0 $$self{'writemakefile'} ||= 'CPAN::Distrostatus'->new('YES')
5655 11 0 0 $$CPAN::Config{'make'} || $Config::Config{'make'}
5663 0 0 0 $$CPAN::Config{'make'} || $Config::Config{'make'}
5715 0 0 0 not defined $need_version or $need_version eq '0'
0 0 0 not defined $need_version or $need_version eq '0' or $need_version eq 'undef'
5789 6 0 0 not exists $$self{'yaml_content'}{'dynamic_config'} or $$self{'yaml_content'}{'dynamic_config'}
5804 6 0 13 $$self{'writemakefile'} or $$self{'modulebuild'}
5915 0 0 0 $$req{$k} ||= $v
5954 9 0 2 exists $$self{'make'} or exists $$self{'later'}
6117 0 0 1 exists $$self{'make'} or exists $$self{'later'}
6183 0 0 0 $$CPAN::Config{'make_install_make_command'} || $self->_make_command
6208 0 0 0 !$$CPAN::Config{'make_install_make_command'} || $$CPAN::Config{'make_install_make_command'} eq $$CPAN::Config{'make'}
6395 0 0 0 $$CPAN::Config{'http_proxy'} || $ENV{'http_proxy'}
6397 0 0 0 $$CPAN::Config{'no_proxy'} || $ENV{'no_proxy'}
6614 59 0 0 not $bestv or 'CPAN::Version'->vgt($foundv, $bestv)
6634 6 0 0 $self->inst_file or $self->cpan_file
6667 0 36 0 $success ||= $$obj{'install'} && $$obj{'install'} eq 'YES'
6769 14 1 0 $$ro{'userid'} || $$ro{'CPAN_USERID'}
7108 0 0 38 $cpan_file eq 'N/A' or $cpan_file =~ /^Contact Author/