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

filter: Statementstmt 100% 24 / 24 Branchbran 100% 8 / 8 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 7 / 7 Podpod 66.6% 2 / 3 totaltotal 97.7% 44 / 45 CC 6 SCAR 10.4
CC
6
Cov
100%
finish_of_run
5.0
before_dump_config
2.0
BEGIN
1.0
CRAP 2.8
« 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 7 ▶sub register {
Subroutine register: called CC=1 SCAR=0.0
Pod undocumented
7 7 my($self, ) = @_;
8 7 $self->add_trigger( before_dump_config => \&before_dump_config );
9 7 ▶ $self->add_trigger( after_setup_module_attribute => sub { shift->SUPER::after_setup_module_attribute(@_) } );
Subroutine __ANON__: called CC=1 SCAR=0.0
10 7 $self->add_trigger( finish_of_run => \&finish_of_run );
11 }
12  
13 2 ▶sub before_dump_config {
Subroutine before_dump_config: called CC=2 SCAR=6.9
Pod documented
14 2 my($self, $config) = @_;
15  
16 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
17 $config->{plugin_vc_svk_scratch_repos} =
18 2 $self->dialog("Your svk base scratch DEPOTPATH: ", $config->{plugin_vc_svk_scratch_repos});
19 }
20  
21 5 ▶sub finish_of_run {
Subroutine finish_of_run: called CC=5 SCAR=16.1
Pod documented
22 5 my $self = shift;
23 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
24  
25 !$self->system(
26 'svk', 'import',
27 '-m', $self->distribute->dist_name . ' import',
28 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
29 '--from-checkout', $self->distribute->base_path,
30 ) or die $?;
31  
32 3 $self->distribute->base_path->rmtree;
33  
34 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
35 !$self->system(
36 'svk', 'co',
37 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 $? 2 1 3
38 $self->distribute->dist_name,
39 ) or die $?;
40 }
41  
42 1 1;
« blib/lib/Module/Setup/Distribute.pm ↑ Summary blib/lib/Module/Setup/Path/Base.pm »