Branch Coverage

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


line true false branch
137 0 0 unless @args
141 0 0 if ($CPAN::HandleConfig::can{$o}) { }
143 0 0 unless ($success)
147 0 0 if $CPAN::DEBUG
148 0 0 unless (exists $CPAN::HandleConfig::keys{$o})
156 0 0 if (do { $o =~ /^(wait_list|urllist|dontload_list|plugin_list)$/ }) { }
0 0 elsif ($o =~ /_hash$/) { }
165 0 0 if $CPAN::DEBUG
167 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) { }
190 0 0 if ($changed)
191 0 0 if ($o eq 'urllist') { }
0 0 elsif ($o eq 'dontload_list') { }
207 0 0 if (@args == 1 and $args[0] eq '') { }
0 0 elsif (@args % 2) { }
220 0 0 if (defined $args[0])
225 0 0 if exists $CPAN::HandleConfig::keys{$o} or defined $$CPAN::Config{$o}
228 0 0 if ($changed)
229 0 0 if ($$CPAN::Config{'auto_commit'}) { }
243 0 0 if (ref $v) { }
0 0 elsif (defined $v) { }
245 0 0 if (ref $v eq 'ARRAY') { }
248 0 0 defined $$v{$_} ? :
276 0 0 if $CPAN::DEBUG
277 0 0 if ($CPAN::RUN_DEGRADED)
287 0 0 if (@args)
288 0 0 if ($args[0] eq 'args') { }
299 0 0 if (not -w $configpm and $configpm =~ m[CPAN/Config\.pm])
312 0 0 if (-f $configpm)
314 0 0 if ($mode and not -w _)
320 0 0 if $must_reload
333 0 0 if $configpm =~ m[CPAN/Config\.pm]
342 0 0 if -f $configpm
343 0 0 unless open $fh, ">$configpm"
347 0 0 unless (exists $CPAN::HandleConfig::keys{$_})
370 0 7 unless defined $v
372 4 3 unless ($t)
376 1 2 if ($t eq 'ARRAY')
386 0 2 unless $t eq 'HASH'
389 0 2 unless defined $key
397 0 0 if ($CPAN::RUN_DEGRADED)
406 0 0 if ($INC{$config})
407 0 0 if $CPAN::DEBUG
461 0 2 if ($quote ne ' ' and defined $command and $command =~ /\s/ and not $command =~ /[$quote]/)
485 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')) { }
505 0 0 if (-f 'File::Spec'->catfile($dir, $file))
513 0 0 if ($err_myconfig and not $err_myconfig =~ /locate \Q$file\E/)
524 0 0 if ($CPAN::META->has_usable('File::HomeDir'))
525 0 0 if ($^O ne 'darwin')
533 0 0 if $ENV{'HOME'}
535 0 0 if $ENV{'HOMEDRIVE'} and $ENV{'HOMEPATH'}
537 0 0 if $ENV{'USERPROFILE'}
540 0 0 $^O eq 'VMS' ? :
542 0 0 wantarray ? :
548 0 7 if $args{'be_silent'}
551 3 4 unless defined $CPAN::HandleConfig::loading
555 0 7 if $CPAN::DEBUG
556 7 0 unless $do_init or @miss
560 0 0 if $CPAN::HandleConfig::loading
564 0 0 if ($configpm and @miss and not $do_init)
565 0 0 if ($make_myconfig or not -w $configpm and $configpm =~ m[CPAN/Config\.pm]) { }
594 0 0 unless -d $configpmdir
596 0 0 if (-w $configpmdir)
598 0 0 if (-f $configpm)
600 0 0 if -f $configpm_bak
601 0 0 if (rename $configpm, $configpm_bak)
609 0 0 if ($fh->open(">$configpm"))
635 0 0 if -f "$d/CPAN/MyConfig.pm"
638 0 0 if -d $d
650 0 7 $^O eq 'MSWin32' ? :
678 0 140 unless exists $CPAN::HandleConfig::keys{$_}
679 0 140 unless defined $$CPAN::Config{$_}
706 0 0 if $CPAN::DEBUG
708 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) { }
744 0 0 if ($prefssupport{$what}) { }
745 0 0 unless $distro and $distro->prefs and $distro->prefs->{'cpanconfig'} and defined $distro->prefs->{'cpanconfig'}{$what}