Branch Coverage

blib/lib/Shipwright/Backend/Base.pm
Criterion Covered Total %
branch 25 138 18.1


line true false branch
70 0 2 unless rcopy(share_root(), $dir)
83 0 2 unless opendir $sw_dh, $sw_dir
99 0 2 unless copy('Module::Info'->new_from_module('Module::Build')->file, $module_build_path)
101 0 2 unless rcopy(catdir('Module::Info'->new_from_module('Module::Build')->inc_dir, 'Module', 'Build'), catdir($module_build_path, 'Build'))
111 2 0 if ('Module::Info'->new_from_module('Perl::OSType'))
113 0 2 unless copy('Module::Info'->new_from_module('Perl::OSType')->file, catdir($dir, 'inc', 'Perl'))
124 0 2 if (-e catfile($dir, 'inc', 'Module', 'Build', 'Version.pm'))
128 2 0 if ('Module::Info'->new_from_module('Module::Metadata'))
129 0 2 unless copy('Module::Info'->new_from_module('Module::Metadata')->file, catdir($dir, 'inc', 'Module'))
136 0 2 unless open my $fh, '<', $file
139 2 0 if ($content =~ s/use version[^'"]+?(['"]?\s*;)/use version $1;/)
140 0 2 unless -w $file
141 0 2 unless open $fh, '>', $file
154 0 2 unless rcopy('Module::Info'->new_from_module('YAML::Tiny')->file, $yaml_tiny_path)
164 0 4 unless rcopy('Module::Info'->new_from_module("Shipwright::Util::$mod")->file, $util_inc_path)
176 0 2 unless rcopy('Module::Info'->new_from_module('File::Compare')->file, $path)
186 0 2 unless rcopy('Module::Info'->new_from_module('File::Copy::Recursive')->file, $path)
195 0 2 unless rcopy('Module::Info'->new_from_module('File::Path')->file, $path)
207 2 0 unless ref $self
211 0 0 if ($self->has_branch_support)
212 0 0 if ($args{'branches'}) { }
220 0 0 if (not $args{'_initialize'} || $args{'_extra_tests'}) { }
221 0 0 if ($args{'_extra_tests'}) { }
0 0 elsif ($args{'build_script'}) { }
222 0 0 if $args{'delete'}
230 0 0 if ($self->info('path', "/scripts/$name") and not $args{'overwrite'}) { }
236 0 0 if $args{'delete'}
248 0 0 if ($self->has_branch_support) { }
249 0 0 if ($self->info('path', "/sources/$name/$args{'as'}") and not $args{'overwrite'}) { }
255 0 0 if $args{'delete'}
262 0 0 if ($args{'as'}) { }
271 0 0 if ($args{'branches'}) { }
0 0 elsif (not $name =~ /^cpan-/ || $$branches{$name} && grep({$args{'as'} eq $_;} @{$$branches{$name};})) { }
274 0 0 if (@{$args{'branches'};})
287 0 0 unless $$branches{$name}
300 0 0 if ($self->info('path', "/dists/$name") and not $args{'overwrite'}) { }
306 0 0 if $args{'delete'}
383 0 0 unless (grep {$name eq $_;} @$order)
402 0 0 unless $args{'for_dists'}
403 0 0 unless (@dists)
420 0 0 unless my $dep = 'Algorithm::Dependency::Ordered'->new('source', $source)
439 0 0 unless $args{'for_dists'}
440 0 0 unless (@dists)
473 0 0 if $$require{$name}
476 0 0 if ($$req{'requires'}) { }
478 0 0 unless $args{"skip_$_"}
490 0 0 if $$require{$dep}
501 0 0 if ($yml) { }
588 0 0 if ($self->has_branch_support)
634 2 0 if ($self->info('path', $path))
651 0 0 if ($self->info('path', $path))
678 0 0 if ($self->info('path', $path))
704 0 4 if $err
706 4 0 if (wantarray) { }
738 0 2 if ($args{'action'} eq 'create') { }
746 1 1 if $info
761 0 0 unless $args{'path'}
763 0 0 if ($args{'path'} =~ m[/$]) { }
765 0 0 if ($args{'path'} eq '/inc/' and not $args{'source'}) { }
0 0 elsif ($args{'source'}) { }
782 0 0 unless -e catfile(share_root(), $args{'path'})
800 0 0 if ($args{'source'}) { }
819 0 0 if (ref $args{'name'}) { }
833 0 0 if ($self->has_branch_support) { }
846 0 0 if $$map{$_} eq $name
853 0 0 if ($_ eq $name)
890 0 0 if ($$req{'requires'}) { }
922 0 0 if $self->info('path', '/shipwright/branches.yml')
940 0 0 unless -e $base_dir