Branch Coverage

lib/CPANPLUS/Internals/Source.pm
Criterion Covered Total %
branch 99 172 57.5


line true false branch
51 9 8082 unless ($self->_mtree or $recurse++ > 0)
64 0 165 unless ($self->_atree or $recurse++ > 0)
173 0 32 unless my $args = check($tmpl, \%hash)
180 0 32 unless ($self->_init_trees("path", $path, "uptodate", $uptodate, "verbose", $verbose, "use_stored", $use_stored))
186 0 32 unless $self->_mtree and $self->_atree
190 31 1 unless ($self->_standard_trees_completed)
193 0 31 unless $self->__create_author_tree("uptodate", $uptodate, "path", $path, "verbose", $verbose)
200 0 31 unless $self->_create_mod_tree("uptodate", $uptodate, "path", $path, "verbose", $verbose)
213 31 1 unless ($self->_custom_trees_completed)
216 2 29 if ($conf->get_conf("enable_custom_sources"))
217 0 2 unless $self->__update_custom_module_sources("verbose", $verbose)
222 2 29 if ($conf->get_conf("enable_custom_sources"))
223 0 2 unless $self->__create_custom_module_entries("verbose", $verbose)
234 0 32 unless ($self->_finalize_trees("path", $path, "uptodate", $uptodate, "verbose", $verbose, "use_stored", $use_stored))
299 0 30 unless my $args = check($tmpl, \%hash)
303 0 30 if $conf->get_conf("no_update") and not $update_source
312 26 34 unless $self->__check_uptodate("file", "File::Spec"->catfile($path, $file), "name", $name, "update_source", $update_source, "verbose", $verbose)
326 1 0 if $conf->get_conf("enable_custom_sources") and $update_source || !$uptodate
382 0 60 unless my $args = check($tmpl, \%hash)
385 24 36 unless (-e $args->{'file'} and (stat $args->{'file'})[9] + $conf->_get_source("update") > time)
392 26 34 if ($flag or $args->{'update_source'}) { }
394 26 0 if ($self->_update_source('name', $args->{'name'})) { }
449 0 29 unless my $args = check($tmpl, \%hash)
476 0 29 unless ($rv)
531 0 31 unless my $args = check($tmpl, \%hash)
542 0 31 unless my $ae = "Archive::Extract"->new("archive", $file)
547 0 31 unless $ae->extract("to", $out)
550 0 31 unless my $cont = $self->_get_file_contents("file", $out)
557 0 31 if ($args->{'verbose'} and local $| = 1)
570 0 124 unless $self->_add_author_object("author", $name, "email", $email, "cpanid", $id)
578 0 124 if $args->{'verbose'}
591 0 31 if $args->{'verbose'}
643 0 31 unless my $args = check($tmpl, \%hash)
655 0 31 unless my $ae = "Archive::Extract"->new("archive", $file)
660 0 31 unless $ae->extract("to", $out)
663 0 31 unless my $content = $self->_get_file_contents("file", $out)
671 0 31 if ($args->{'verbose'} and local $| = 1)
681 279 310 unless ($past_header)
684 31 248 if (/^\s*$/) { }
685 0 31 unless ($count)
694 31 217 if /^Line-Count:\s+(\d+)/
695 62 186 if ($count)
696 0 62 if ($lines < $count)
711 0 310 unless @data == 3
727 0 310 unless ($aobj)
764 0 310 $data[1] eq 'undef' ? :
0 310 unless $self->_add_module_object("module", $data[0], "version", $data[1] eq "undef" ? "0.0" : $data[1], "path", "File::Spec::Unix"->catfile($base, $data[2]), "comment", $data[3], "author", $aobj, "package", $package, "description", $dslip_mod->{'description'}, "dslip", $dslip, "mtime", "")
771 0 310 if $args->{'verbose'}
784 0 31 if $args->{'verbose'}
921 0 1 unless check($tmpl, \%hash)
927 0 1 if (sub { ;}->($index))
934 1 0 unless (sub { ;}->($dir))
935 0 1 unless $self->_mkdir("dir", $dir)
940 0 1 unless (my $fh = sub { ;}->($index, ">"))
948 0 1 unless (close $fh)
957 0 1 unless ($self->__update_custom_module_source("remote", $uri, "local", $index, "verbose", $verbose))
984 0 2 unless check($tmpl, \%hash)
1015 0 1 unless check($tmpl, \%hash)
1023 0 1 if not defined $file and ""
1025 0 1 unless (defined $file)
1032 0 1 if (sub { ;}->($file))
1069 3 7 unless (sub { ;}->($dir))
1107 0 4 unless check($tmpl, \%hash)
1115 0 2 unless $self->__update_custom_module_source("remote", $remote, "local", $local, "verbose", $verbose)
1122 0 4 if $fail
1124 0 4 if $fail
1152 0 4 unless check($tmpl, \%hash)
1160 0 1 unless (my(%files) = reverse($self->__list_custom_module_sources))
1169 0 1 if not defined $file and ""
1172 0 1 unless ($file)
1193 0 4 if ($res) { }
1196 4 0 if ($ff->scheme eq 'file') { }
1214 0 4 unless $self->__write_custom_module_index("path", $ff_path, "to", $local, "verbose", $verbose)
1227 0 0 unless $self->_move("file", $res, "to", $local)
1259 0 5 unless check($tmpl, \%hash)
1268 20 25 unless my $ae = do {
1275 0 25 unless $ae->type
1291 0 5 unless (sub { ;}->($dir))
1292 0 0 unless $self->_mkdir("dir", $dir)
1297 0 5 unless my $fh = sub { ;}->($to, ">")
1331 0 3 unless check($tmpl, \%hash)
1339 0 2 unless my $fh = sub { ;}->($file)
1343 0 10 if /^#/
1344 0 10 unless /\S+/
1350 0 10 unless my $mod = $self->parse_module("module", $parse)
1370 8 2 if (my $old_mod = $self->module_tree($mod->module))