Branch Coverage

blib/lib/CPAN/HandleConfig.pm
Criterion Covered Total %
branch 16 164 9.7


line true false branch
144 0 0 unless @args
148 0 0 if ($CPAN::HandleConfig::can{$o}) { }
150 0 0 unless ($success)
154 0 0 if $CPAN::DEBUG
155 0 0 unless (exists $CPAN::HandleConfig::keys{$o})
163 0 0 if (do { $o =~ /^(wait_list|urllist|dontload_list|plugin_list)$/ }) { }
0 0 elsif ($o =~ /_hash$/) { }
172 0 0 if $CPAN::DEBUG
174 0 0 if ($func eq 'push') { }
0 0 elsif ($func eq 'pop') { }
0 0 elsif ($func eq 'shift') { }
0 0 elsif ($func eq 'unshift') { }
0 0 elsif ($func eq 'splice') { }
0 0 elsif ($func) { }
197 0 0 if ($changed)
198 0 0 if ($o eq 'urllist') { }
0 0 elsif ($o eq 'dontload_list') { }
214 0 0 if (@args == 1 and $args[0] eq '') { }
0 0 elsif (@args % 2) { }
227 0 0 if (defined $args[0])
233 0 0 if exists $CPAN::HandleConfig::keys{$o} or defined $CPAN::Config->{$o}
235 0 0 if ($changed)
236 0 0 if ($CPAN::Config->{'auto_commit'}) { }
250 0 0 if (ref $v) { }
0 0 elsif (defined $v) { }
252 0 0 if (ref $v eq 'ARRAY') { }
259 0 0 defined $v->{$_} ? :
283 0 0 if $CPAN::DEBUG
284 0 0 if ($CPAN::RUN_DEGRADED)
294 0 0 if (@args)
295 0 0 if ($args[0] eq 'args') { }
306 0 0 if (not -w $configpm and $configpm =~ m[CPAN/Config\.pm])
319 0 0 if (-f $configpm)
321 0 0 if ($mode and not -w _)
327 0 0 if $must_reload
340 0 0 if $configpm =~ m[CPAN/Config\.pm]
349 0 0 if -f $configpm
350 0 0 unless open $fh, ">$configpm"
354 0 0 unless (exists $CPAN::HandleConfig::keys{$_})
377 0 7 unless defined $v
379 4 3 unless ($t)
383 1 2 if ($t eq 'ARRAY')
393 0 2 unless $t eq 'HASH'
404 0 0 if ($CPAN::RUN_DEGRADED)
413 0 0 if ($INC{$config})
414 0 0 if $CPAN::DEBUG
468 0 2 if ($quote ne ' ' and defined $command and $command =~ /\s/ and not $command =~ /[$quote]/)
492 9 0 if ($INC{'CPAN/MyConfig.pm'} or _try_loading('CPAN::MyConfig', cpan_home())) { }
0 0 elsif ($INC{'CPAN/Config.pm'} or _try_loading('CPAN::Config')) { }
512 0 0 if (-f 'File::Spec'->catfile($dir, $file))
520 0 0 if ($err_myconfig and not $err_myconfig =~ /locate \Q$file\E/)
531 0 0 if ($CPAN::META->has_usable('File::HomeDir'))
532 0 0 if ($^O ne 'darwin')
540 0 0 if $ENV{'HOME'}
543 0 0 if $ENV{'HOMEDRIVE'} and $ENV{'HOMEPATH'}
544 0 0 if $ENV{'USERPROFILE'}
547 0 0 $^O eq 'VMS' ? :
549 0 0 wantarray ? :
555 0 9 if $args{'be_silent'}
558 4 5 unless defined $CPAN::HandleConfig::loading
562 0 9 if $CPAN::DEBUG
563 9 0 unless $do_init or @miss
567 0 0 if $CPAN::HandleConfig::loading
571 0 0 if ($configpm and @miss and not $do_init)
572 0 0 if ($make_myconfig or not -w $configpm and $configpm =~ m[CPAN/Config\.pm]) { }
601 0 0 unless -d $configpmdir
603 0 0 if (-w $configpmdir)
605 0 0 if (-f $configpm)
607 0 0 if -f $configpm_bak
608 0 0 if (rename $configpm, $configpm_bak)
616 0 0 if ($fh->open(">$configpm"))
642 0 0 if -f "$d/CPAN/MyConfig.pm"
645 0 0 if -d $d
657 0 9 $^O eq 'MSWin32' ? :
685 0 180 unless exists $CPAN::HandleConfig::keys{$_}
686 0 180 unless defined $CPAN::Config->{$_}
713 0 0 if $CPAN::DEBUG
715 0 0 if (defined $words[2] and $words[2] =~ /list$/ and @words == 3 || @words == 4 && length $word) { }
0 0 elsif (defined $words[2] and $words[2] eq 'init' and @words == 3 || @words >= 4 && length $word) { }
0 0 elsif (@words >= 4) { }
751 0 0 if ($prefssupport{$what}) { }
756 0 0 unless $distro and $distro->prefs and $distro->prefs->{'cpanconfig'} and defined $distro->prefs->{'cpanconfig'}{$what}