blib/lib/Module/Setup/Plugin/VC/SVK.pm

filter: Statementstmt 100% 27 / 27 Branchbran 100% 8 / 8 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 8 / 8 Podpod 66.6% 2 / 3 totaltotal 97.9% 48 / 49 CC 6 SCAR 9.9
CC
6
Cov
100%
finish_of_run
5.0
before_dump_config
2.0
BEGIN
1.0
CRAP 2.7
« blib/lib/Module/Setup/Distribute.pm ↑ Summary blib/lib/Module/Setup/Path/Base.pm »
1 package Module::Setup::Plugin::VC::SVK;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use base 'Module::Setup::Plugin::VC::SVN';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Path::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub register {
9 7 ▶ my($self, ) = @_;
Subroutine register: called CC=1 SCAR=0.0
Pod undocumented
10 7 $self->add_trigger( before_dump_config => \&before_dump_config );
11 7 ▶ $self->add_trigger( after_setup_module_attribute => sub { shift->SUPER::after_setup_module_attribute(@_) } );
Subroutine __ANON__: called CC=1 SCAR=0.0
12 7 $self->add_trigger( finish_of_run => \&finish_of_run );
13 }
14  
15 sub before_dump_config {
16 2 ▶ my($self, $config) = @_;
Subroutine before_dump_config: called CC=2 SCAR=6.9
Pod documented
17  
18 2 ▶ $config->{plugin_vc_svk_scratch_repos} ||= '//scratch';
Condition100%2/2
$config->{"plugin_vc_svk_scratch_repos"} ||= "//scratch"
l!l
11
MC/DC100%1/1
$config->{"plugin_vc_svk_scratch_repos"} ||= "//scratch"
$config->{"plugin_vc_svk_scratch_repos"}
Truth table100%2/2
A
A= $config->{"plugin_vc_svk_scratch_repos"}
Aresult
11
00
19 $config->{plugin_vc_svk_scratch_repos} =
20 2 $self->dialog("Your svk base scratch DEPOTPATH: ", $config->{plugin_vc_svk_scratch_repos});
21 }
22  
23 sub finish_of_run {
24 5 ▶ my $self = shift;
Subroutine finish_of_run: called CC=5 SCAR=16.1
Pod documented
25 5 ▶ return unless $self->dialog("import to SVK scratch DEPOTPATH? [yN] ", 'n') =~ /[Yy]/;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->dialog("import to SVK scratch DEPOTPATH? [yN] ", "n") =~ /[Yy]/ 1 4 5
26  
27 !$self->system(
28 'svk', 'import',
29 '-m', $self->distribute->dist_name . ' import',
30 4 ▶ $self->config->{plugin_vc_svk_scratch_repos} . '/' . $self->distribute->dist_name,
Branch: 1 branch
BranchTrueFalseTotal
$self->system("svk", "import", "-m", $self->distribute->dist_name . ' import', $self->config->{"plugin_vc_svk_scratch_repos"} . '/' . $self->distribute->dist_name, "--from-checkout", $self->distribute->base_path) and die $? 1 3 4
31 '--from-checkout', $self->distribute->base_path,
32 ) or die $?;
33  
34 3 $self->distribute->base_path->rmtree;
35  
36 3 ▶ my $trunk_path = $self->plugins_stash->{'VC::SVN'}->{is_subversion_friendly} ? '/trunk' : '';
Branch: 1 branch
BranchTrueFalseTotal
$self->plugins_stash->{'VC::SVN'}{'is_subversion_friendly'} ? : 1 2 3
37 !$self->system(
38 'svk', 'co',
39 3 ▶ $self->config->{plugin_vc_svk_scratch_repos} . '/' . $self->distribute->dist_name . $trunk_path,
Branch: 1 branch
BranchTrueFalseTotal
not $self->system("svk", "co", $self->config->{"plugin_vc_svk_scratch_repos"} . '/' . $self->distribute->dist_name . $trunk_path, $self->distribute->dist_name) or die $? 1 2 3
40 $self->distribute->dist_name,
41 ) or die $?;
42 }
43  
44 1 1;
« blib/lib/Module/Setup/Distribute.pm ↑ Summary blib/lib/Module/Setup/Path/Base.pm »