Branch Coverage

lib/CPANPLUS/Module.pm
Criterion Covered Total %
branch 119 196 60.7


line true false branch
81 111 3104 if @_ > 1
284 0 256 unless my $object = check($tmpl, \%hash)
294 704 70 if $self->_status
367 58 0 if shift(@_)->package =~ /$regex/
371 22 0 if shift(@_)->package =~ /$regex/
375 10 0 if shift(@_)->package =~ /$regex/
382 4 22 if $self->package_name eq 'perl'
386 0 22 if ($core)
388 0 0 if $self->version > $self->installed_version
391 0 0 if $self->version > $core
414 2 13 shift(@_)->module =~ /^bundle(?:-|::)/i ? :
420 27 0 unless can_load('modules', {'Module::ThirdParty', 0})
428 0 0 unless $self->is_third_party
476 1 48 if $self->status->_fetch_from
479 0 49 unless my $where = $cb->_fetch(@_, %args)
482 13 36 if (not $self->status->_fetch_from and $cb->configure_object->get_conf('md5') and $self->package ne 'CHECKSUMS')
486 0 13 unless ($self->_validate_checksum)
510 1 13 unless ($self->status->fetch)
543 0 15 unless check($tmpl, \%hash)
546 0 15 unless ($extract)
558 1 14 if not $prefer_makefile and $found_build
559 0 15 if $found_build and not $found_makefile
560 14 1 if $prefer_makefile and $found_makefile
561 6 9 if $found_makefile and not $found_build
564 1 14 if ($type eq 'CPANPLUS::Dist::Build' and not grep {$_ eq 'CPANPLUS::Dist::Build';} 'CPANPLUS::Dist'->dist_types) { }
0 14 elsif (not $type) { }
582 15 0 if $type
610 0 14 unless $self->status->installer_type
622 0 14 unless check($tmpl, \%hash)
624 0 14 unless my $dist = 'CPANPLUS::Dist'->new('format', $type, 'module', $self)
629 6 8 $type eq $self->status->installer_type ? :
640 1 13 unless $dist->prepare(%$args)
646 1 12 if $target eq 'prepare'
648 1 11 unless $dist->create(%$args)
744 0 13 unless $args = check($tmpl, \%hash)
751 5 8 if $target ne 'install'
754 0 13 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 {
765 1 12 if ($self->package_is_perl_core) { }
0 12 elsif ($self->is_third_party) { }
767 1 0 if ($self->installed_version > $self->version) { }
0 0 elsif ($self->installed_version == $self->version) { }
807 8 4 unless ($self->status->fetch)
810 0 16 if exists $$args{$_}
813 16 0 if defined $$args{$_}
815 0 8 unless $self->fetch(%$params)
819 8 4 unless ($self->status->extract)
822 0 16 if exists $$args{$_}
825 16 0 if defined $$args{$_}
827 0 8 unless $self->extract(%$params)
832 0 12 unless ($format)
844 4 8 if ($conf->get_conf('signature'))
845 0 4 if (not $self->check_signature('verbose', $$args{'verbose'})) { }
852 0 0 if ($conf->get_conf('cpantest'))
853 0 0 unless $cb->_send_report('module', $self, 'failed', 1, 'buffer', 'CPANPLUS::Error'->stack_as_string, 'verbose', $$args{'verbose'}, 'force', $$args{'force'})
876 0 12 if ($self->is_bundle)
879 0 0 unless (@prereqs)
890 2 10 unless ($dist)
896 5 5 if $target ne 'install'
898 4 1 $dist->install(%$args) ? :
902 4 1 if $ok
921 0 1 unless ($self->is_bundle)
927 0 1 unless ($dir = $self->status->extract)
934 1 4 if /\.pm/i
940 0 1 unless my $fh = 'FileHandle'->new($file)
947 1 26 if $flag and /^=head/i
953 1 25 if /^=head1 CONTENTS/i
955 4 22 if ($flag and /^(?!=)(\S+)\s*(\S+)?/)
961 0 4 unless ($obj)
968 4 0 unless ($$seen{$obj->module}++)
998 1 2 if $self->status->readme
1001 0 2 unless can_load('modules', {'FileHandle', '0.0'}, 'verbose', 1)
1006 0 2 unless my $obj = $self->clone
1022 0 2 unless $file
1027 0 2 unless ($fh->open($file))
1131 0 1 if $self->installed_version
1223 0 1 unless my $args = check($tmpl, \%hash)
1225 0 1 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')
1236 0 1 unless ($self->installed_version)
1243 0 1 unless my $files = $self->files('type', $type)
1244 0 1 unless my $dirs = $self->directory_tree('type', $type)
1249 1 0 if $pack
1254 0 3 unless defined $file and -f $file
1259 0 3 if $sudo
1262 0 3 unless (run('command', \@cmd, 'verbose', $verbose, 'buffer', \$buffer))
1273 0 14 unless open DIR, $dir
1277 14 0 unless @count == 2
1290 0 0 if $sudo
1293 0 0 unless (run('command', \@cmd, 'verbose', $verbose, 'buffer', \$buffer))
1303 0 1 $flag ? :
1321 0 1 unless my(@list) = $self->author->distributions(%hash, 'module', $self)
1396 0 7 unless my $args = check($tmpl, \%hash)
1401 0 7 if ($err)
1404 0 7 unless can_load('modules', {'ExtUtils::Installed', '0.0'}, 'verbose', $verbose)
1410 0 7 unless ($inst = 'ExtUtils::Installed'->new)
1422 0 7 if ($@)
1429 4 3 wantarray ? :
1449 7 0 if (my $dir = $self->status->extract) { }
1451 0 7 unless $cb->_add_to_includepath('directories', ['File::Spec'->catdir(sub {