Branch Coverage

blib/lib/CPAN/HandleConfig.pm
Criterion Covered Total %
branch 17 166 10.2


line true false branch
136 0 0 unless @args
140 0 0 if ($CPAN::HandleConfig::can{$o}) { }
142 0 0 unless ($success)
146 0 0 if $CPAN::DEBUG
147 0 0 unless (exists $CPAN::HandleConfig::keys{$o})
155 0 0 if (do { $o =~ /^(wait_list|urllist|dontload_list)$/ }) { }
0 0 elsif ($o =~ /_hash$/) { }
164 0 0 if $CPAN::DEBUG
166 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) { }
189 0 0 if ($changed)
190 0 0 if ($o eq 'urllist') { }
0 0 elsif ($o eq 'dontload_list') { }
206 0 0 if (@args == 1 and $args[0] eq '') { }
0 0 elsif (@args % 2) { }
219 0 0 if (defined $args[0])
224 0 0 if exists $CPAN::HandleConfig::keys{$o} or defined $$CPAN::Config{$o}
227 0 0 if ($changed)
228 0 0 if ($$CPAN::Config{'auto_commit'}) { }
242 0 0 if (ref $v) { }
0 0 elsif (defined $v) { }
244 0 0 if (ref $v eq 'ARRAY') { }
247 0 0 defined $$v{$_} ? :
275 0 0 if $CPAN::DEBUG
276 0 0 if ($CPAN::RUN_DEGRADED)
286 0 0 if (@args)
287 0 0 if ($args[0] eq 'args') { }
298 0 0 if (not -w $configpm and $configpm =~ m[CPAN/Config\.pm])
311 0 0 if (-f $configpm)
313 0 0 if ($mode and not -w _)
319 0 0 if $must_reload
332 0 0 if $configpm =~ m[CPAN/Config\.pm]
341 0 0 if -f $configpm
342 0 0 unless open $fh, ">$configpm"
346 0 0 unless (exists $CPAN::HandleConfig::keys{$_})
369 0 7 unless defined $v
371 4 3 unless ($t)
375 1 2 if ($t eq 'ARRAY')
385 0 2 unless $t eq 'HASH'
388 0 2 unless defined $key
396 0 0 if ($CPAN::RUN_DEGRADED)
405 0 0 if ($INC{$config})
406 0 0 if $CPAN::DEBUG
460 0 2 if ($quote ne ' ' and defined $command and $command =~ /\s/ and not $command =~ /[$quote]/)
484 7 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')) { }
504 0 0 if (-f 'File::Spec'->catfile($dir, $file))
512 0 0 if ($err_myconfig and not $err_myconfig =~ /locate \Q$file\E/)
523 0 0 if ($CPAN::META->has_usable('File::HomeDir'))
524 0 0 if ($^O ne 'darwin')
532 0 0 if $ENV{'HOME'}
534 0 0 if $ENV{'HOMEDRIVE'} and $ENV{'HOMEPATH'}
536 0 0 if $ENV{'USERPROFILE'}
539 0 0 $^O eq 'VMS' ? :
541 0 0 wantarray ? :
547 0 7 if $args{'be_silent'}
550 3 4 unless defined $CPAN::HandleConfig::loading
554 0 7 if $CPAN::DEBUG
555 7 0 unless $do_init or @miss
559 0 0 if $CPAN::HandleConfig::loading
563 0 0 if ($configpm and @miss and not $do_init)
564 0 0 if ($make_myconfig or not -w $configpm and $configpm =~ m[CPAN/Config\.pm]) { }
593 0 0 unless -d $configpmdir
595 0 0 if (-w $configpmdir)
597 0 0 if (-f $configpm)
599 0 0 if -f $configpm_bak
600 0 0 if (rename $configpm, $configpm_bak)
608 0 0 if ($fh->open(">$configpm"))
634 0 0 if -f "$d/CPAN/MyConfig.pm"
637 0 0 if -d $d
649 0 7 $^O eq 'MSWin32' ? :
677 0 140 unless exists $CPAN::HandleConfig::keys{$_}
678 0 140 unless defined $$CPAN::Config{$_}
705 0 0 if $CPAN::DEBUG
707 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) { }
743 0 0 if ($prefssupport{$what}) { }
744 0 0 unless $distro and $distro->prefs and $distro->prefs->{'cpanconfig'} and defined $distro->prefs->{'cpanconfig'}{$what}