Branch Coverage

lib/CPANPLUS/Module.pm
Criterion Covered Total %
branch 133 240 55.4


line true false branch
94 216 6252 if @_ > 1
159 0 64 if $self->_dslip ne " "
164 0 313 if $mod->_dslip ne " "
326 0 457 unless my $object = check($tmpl, \%hash)
336 959 125 if $self->_status
432 312 4 if @res
442 4 27 if $self->package_name eq "perl"
450 0 27 if (defined $core)
452 0 0 if $cb->_vcmp($self->version, $self->installed_version) > 0
456 0 0 if $cb->_vcmp($self->version, $core) >= 0
474 29 3 ref $self ? :
486 4 28 if (exists $Module::CoreList::version{0 + $ver}{$name})
488 0 4 unless $core
498 2 20 if $self->module =~ /^bundle(?:-|::)/i
501 4 16 if $self->is_autobundle
513 10 50 if $self->module eq $prefix
520 44 0 unless can_load("modules", {"Module::ThirdParty", 0})
528 0 0 unless $self->is_third_party
577 2 52 if $self->status->_fetch_from
580 0 54 unless my $where = $cb->_fetch(@_, %args)
583 16 36 if (not $self->status->_fetch_from and $cb->configure_object->get_conf("md5") and $self->package ne "CHECKSUMS")
587 0 16 unless ($self->_validate_checksum)
611 1 16 unless ($self->status->fetch)
618 1 15 if ($self->is_autobundle)
655 0 20 unless check($tmpl, \%hash)
660 2 18 if ($self->is_autobundle) { }
665 0 18 unless ($extract)
677 1 17 if not $prefer_makefile and $found_build
678 1 17 if $found_build and not $found_makefile
679 16 2 if $prefer_makefile and $found_makefile
680 16 2 if $found_makefile and not $found_build
682 0 18 if $self->package =~ /^Module-Build-\d/
688 1 19 if ($type and $type eq 'CPANPLUS::Dist::Build' and not 'CPANPLUS::Dist'->has_dist_type('CPANPLUS::Dist::Build') && $cb->module_tree('CPANPLUS::Dist::Build')->is_uptodate('version', '0.60')) { }
1 18 elsif (not $type) { }
718 20 0 if $type
746 0 19 unless $self->status->installer_type
757 0 19 unless check($tmpl, \%hash)
760 1 18 unless ("CPANPLUS::Dist"->has_dist_type($type))
765 1 0 if ($type eq 'CPANPLUS::Dist::Build') { }
772 0 1 unless ($cb->module_tree($type)->install("target", $target, %$args))
781 1 0 if ('CPANPLUS::Dist'->has_dist_type($type)) { }
802 14 5 unless ($dist = $self->status->dist)
803 0 13 unless $dist = $type->new("module", $self)
807 13 5 unless ($dist_cpan = $self->status->dist_cpan)
809 5 8 $type eq $self->status->installer_type ? :
820 1 17 if $target eq "init"
823 1 16 unless $dist->prepare(%$args)
827 2 14 if $target eq "prepare"
829 1 13 unless $dist->create(%$args)
925 0 17 unless $args = check($tmpl, \%hash)
933 9 8 if $target ne "install"
936 0 0 if ($target eq "install" and not $args->{'force'} and not $self->package_is_perl_core and $self->status->installed || $self->is_uptodate and not sub { ;}->($format))
947 1 16 if ($self->package_is_perl_core) { }
0 16 elsif ($self->is_third_party) { }
949 1 0 if ($self->installed_version > $self->version) { }
0 0 elsif ($self->installed_version == $self->version) { }
989 9 7 unless ($self->status->fetch)
992 0 18 if exists $args->{$_}
995 18 0 if defined $args->{$_}
997 0 9 unless $self->fetch(%$params)
1001 10 6 unless ($self->status->extract)
1004 0 20 if exists $args->{$_}
1007 20 0 if defined $args->{$_}
1009 0 10 unless $self->extract(%$params)
1012 8 8 if $format
1015 0 16 unless ($format)
1028 0 16 if ($conf->get_conf("signature"))
1029 0 0 if ($self->check_signature('verbose', $args->{'verbose'})) { }
1036 0 0 if ($conf->get_conf("cpantest"))
1043 0 0 unless $cb->_send_report("module", $self, "failed", 1, "buffer", "CPANPLUS::Error"->stack_as_string, "verbose", $args->{'verbose'}, "force", $args->{'force'})
1060 1 15 if ($self->is_bundle)
1063 0 1 unless (@prereqs)
1074 2 13 unless ($dist)
1080 8 5 if $target ne "install"
1082 4 1 $dist->install(%$args) ? :
1086 4 1 if $ok
1107 0 3 unless ($self->is_bundle)
1116 2 1 if ($self->is_autobundle) { }
1118 0 2 unless ($where = $self->status->fetch)
1128 0 1 unless ($dir = $self->status->extract)
1134 1 7 if /\.pm/i
1141 0 3 unless my $fh = "FileHandle"->new($file)
1148 1 62 if $flag and /^=head/i
1154 3 59 if /^=head1 CONTENTS/i
1156 7 55 if ($flag and /^(?!=)(\S+)\s*(\S+)?/)
1162 0 7 unless ($obj)
1169 7 0 unless ($$seen{$obj->module}++)
1199 1 2 if $self->status->readme
1202 0 2 unless can_load("modules", {"FileHandle", "0.0"}, "verbose", 1)
1207 0 2 unless my $obj = $self->clone
1223 0 2 unless $file
1228 0 2 unless ($fh->open($file))
1298 0 39 if defined $href->{'dir'} and ref $href->{'dir'}
1345 0 0 if $self->installed_version
1347 0 0 if $self->installed_file
1438 0 0 unless my $args = check($tmpl, \%hash)
1440 0 0 if ($conf->get_conf("dist_type") and $conf->get_conf('dist_type') ne 'CPANPLUS::Dist::Build' || $conf->get_conf('dist_type') ne 'CPANPLUS::Dist::MM')
1451 0 0 unless ($self->installed_version)
1458 0 0 unless my $files = $self->files("type", $type)
1459 0 0 unless my $dirs = $self->directory_tree("type", $type)
1464 0 0 if $pack
1469 0 0 unless defined $file and -f $file
1474 0 0 if $sudo
1477 0 0 unless (run("command", \@cmd, "verbose", $verbose, "buffer", \$buffer))
1488 0 0 unless opendir DIR, $dir
1492 0 0 unless @count == 2
1505 0 0 if $sudo
1508 0 0 unless (run("command", \@cmd, "verbose", $verbose, "buffer", \$buffer))
1518 0 0 $flag ? :
1536 0 1 unless my(@list) = $self->author->distributions(%hash, "module", $self)
1592 0 0 unless my $args = check($tmpl, \%hash)
1597 0 0 if ($err)
1600 0 0 unless can_load("modules", {"ExtUtils::Installed", "0.0"}, "verbose", $verbose)
1656 0 0 unless my $dir = $Config::Config{$href->{$key} . "exp"}
1674 0 0 unless ($inst = "ExtUtils::Installed"->new("extra_libs", \@libs))
1686 0 0 if ($@)
1693 0 0 wantarray ? :
1716 10 0 if (my $dir = $self->status->extract) { }
1718 0 10 unless $cb->_add_to_includepath("directories", ["File::Spec"->catdir(sub { ;}->($dir), "lib"), "File::Spec"->catdir(sub { ;}->($dir), "arch"), sub { ;}->($dir)])
1726 0 10 unless $cb->_add_to_path("directories", ["File::Spec"->catdir(sub { ;}->($dir), "script"), "File::Spec"->catdir(sub { ;}->($dir), "bin")])