Branch Coverage

inc/Module/AutoInstall.pm
Criterion Covered Total %
branch 25 210 11.9


line true false branch
39 0 0 UNIVERSAL::isa($Config, 'HASH') ? :
0 0 $Config ? :
56 1 1 if ($arg =~ /^--config=(.*)$/) { }
1 0 elsif ($arg =~ /^--installdeps=(.*)$/) { }
0 0 elsif ($arg =~ /^--default(?:deps)?$/) { }
0 0 elsif ($arg =~ /^--check(?:deps)?$/) { }
0 0 elsif ($arg =~ /^--skip(?:deps)?$/) { }
0 0 elsif ($arg =~ /^--test(?:only)?$/) { }
80 0 0 unless $AcceptDefault
85 0 0 $y ? :
0 0 $y ? :
93 0 0 unless my(@args) = @_
109 0 0 ref $_ eq 'HASH' ? :
0 0 ref $_ ? :
112 0 0 unless /^[^\-]/
122 0 0 if ($feature =~ /^-(\w+)$/)
126 0 0 if $option eq 'version'
129 0 0 if $option eq 'config'
132 0 0 if $option eq 'core'
135 0 0 unless $option eq 'core'
140 0 0 if UNIVERSAL::isa($modules, 'HASH')
142 0 0 if ref $$modules[0] eq 'CODE'
146 0 0 if ($mod =~ /^-(\w+)$/)
149 0 0 if $option eq 'default'
150 0 0 if $option eq 'conflict'
151 0 0 if $option eq 'tests'
152 0 0 if $option eq 'skiptests'
159 0 0 if ($arg and $arg =~ /^\D/)
165 0 0 if (defined(my $cur = _version_check(_load($mod), $arg ||= 0))) { }
168 0 0 $arg ? :
173 0 0 $arg ? :
178 0 0 unless @required
182 0 0 if (not $SkipInstall and $CheckOnly || _prompt('==> Auto-install the ' . @required / 2 . ($mandatory ? ' mandatory' : ' optional') . ' module(s) from CPAN?', $default ? 'y' : 'n') =~ /^[Yy]/) { }
0 0 elsif (not $SkipInstall and $default and $mandatory and _prompt('==> The module(s) are mandatory! Really skip?', 'n') =~ /^[Nn]/) { }
218 0 0 if (@Missing and not $CheckOnly || $UnderCPAN)
224 0 0 if eval '$>'
233 0 0 if caller 0 eq 'main'
239 0 1 unless @Missing
241 0 1 if ($ENV{'PERL5_CPANPLUS_IS_RUNNING'})
254 1 0 unless -f $lock
258 0 0 unless open LOCK, $lock
260 0 0 $^O eq 'MSWin32' ? :
0 0 if ($^O eq 'MSWin32' ? _under_cpan() : <LOCK> == getppid and ($$CPAN::Config{'prerequisites_policy'} || '') ne 'ignore')
280 0 0 if ++$i
286 1 1 if (defined _version_check(_load($pkg), $ver)) { }
294 0 1 unless @modules
295 0 1 if _check_lock()
299 0 1 unless _connected_to('cpan.org')
304 0 1 if ($args{'do_once'} and open FAILED, '.#autoinstall.failed')
310 0 0 unless $failed{$k}
315 0 1 if (_has_cpanplus()) { }
325 0 0 if (defined _version_check(_load($pkg), $ver)) { }
0 0 elsif ($args{'do_once'} and open FAILED, '>> .#autoinstall.failed') { }
333 0 0 if $args{'do_once'}
347 0 0 unless $conf->can('conf') or _can_write($conf->_get_build('base'))
352 0 0 if (UNIVERSAL::isa($makeflags, 'HASH')) { }
354 0 0 unless exists $$makeflags{'UNINST'}
358 0 0 if not $makeflags =~ /\bUNINST\b/ and eval " $> eq '0' "
375 0 0 if defined &MY::preinstall
380 0 0 if ($obj and defined _version_check($$obj{'version'}, $ver)) { }
390 0 0 if ($rv and $$rv{$$obj{'module'}} || $$rv{'ok'}) { }
405 0 0 if defined &MY::postinstall
415 0 0 if ($key eq 'prerequisites_policy') { }
416 0 0 if ($value eq 'follow') { }
0 0 elsif ($value eq 'ask') { }
0 0 elsif ($value eq 'ignore') { }
441 0 1 if ('CPAN'->VERSION < 1.8)
443 0 0 unless _can_write('MM'->catfile($$CPAN::Config{'cpan_home'}, 'sources')) and _can_write($Config::Config{'sitelib'})
449 1 0 if not $makeflags =~ /\bUNINST\b/ and eval " $> eq '0' "
458 0 0 if $opt =~ /^force$/
466 0 1 if defined &MY::preinstall
473 1 0 if ($obj and defined _version_check($obj->cpan_version, $ver)) { }
481 0 1 $args{'force'} ? :
484 0 0 if $CPAN::META
489 0 0 if ($rv eq 'YES') { }
506 0 0 if defined &MY::postinstall
537 0 0 if defined _version_check(_load($class), $ver)
539 0 0 if (_prompt("==> A newer version of $class ($ver) is required. Install?", 'y') =~ /^[Nn]/)
552 0 0 if $class->install([], $class, $ver)
578 0 0 unless -e $path
580 0 0 if -w $path
587 0 0 -t STDIN ? :
0 0 if (eval '$>' and lc(`sudo -V`) =~ /version/ and _prompt("\n==> Should we try to re-execute the autoinstall process with 'sudo'?", -t STDIN ? 'y' : 'n') =~ /^[Yy]/)
602 0 0 UNIVERSAL::isa($Config, 'HASH') ? :
0 0 if $Config
606 0 0 unless system 'sudo', $^X, $0, "--config=$config", "--installdeps=$missing"
634 1 1 if $CPAN::VERSION
636 1 0 if ($CPAN::HandleConfig::VERSION) { }
648 1 2 unless defined $cur
653 0 2 if (ref $cur or ref $min or $cur =~ /v|\..*\./ or $min =~ /v|\..*\./)
654 0 0 if ($version::VERSION || defined _load('version') and 'version'->can('new')) { }
0 0 elsif ($Sort::Versions::VERSION or defined _load('Sort::Versions')) { }
660 0 0 'version'->new($cur) >= 'version'->new($min) ? :
666 0 0 Sort::Versions::versioncmp($cur, $min) != -1 ? :
677 2 0 $cur >= $min ? :
686 0 0 unless $args{'PREREQ_PM'}
0 0 if $UnderCPAN or $TestOnly
689 0 0 if ($args{'EXE_FILES'} and -e 'MANIFEST')
704 0 0 UNIVERSAL::isa($Config, 'HASH') ? :
0 0 if $Config
707 0 0 $missing ? :
719 0 0 if @_ % 2
721 0 0 if ($CheckOnly)
733 0 0 unless defined &MY::postamble
736 0 0 unless $PostambleUsed