blib/lib/Module/Setup/Path/Flavor.pm

filter: Statementstmt 85.7% 36 / 42 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 92.8% 13 / 14 Podpod 0.0% 0 / 6 totaltotal 79.0% 49 / 62 CC 1 SCAR 0.7
CC
1
Cov
86%
create_flavor
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« blib/lib/Module/Setup/Path.pm ↑ Summary blib/lib/Module/Setup/Path/Additional.pm »
1 package Module::Setup::Path::Flavor;
2 40 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 40 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 40 ▶use base 'Module::Setup::Path::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 40 ▶use YAML ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 40 ▶use Module::Setup::Path::Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 40 ▶use Module::Setup::Path::Plugins;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 40 ▶use Module::Setup::Path::Template;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 40 ▶use Module::Setup::Path::Additional;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 sub new {
14 108 ▶ my($class, @path) = @_;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
15 108 my $self = $class->SUPER::new(@path);
16  
17 108 $self->{config} = Module::Setup::Path::Config->new($self->path_to('config.yaml'));
18 108 $self->{plugins} = Module::Setup::Path::Plugins->new($self->path_to('plugins'));
19 108 $self->{template} = Module::Setup::Path::Template->new($self->path_to('template'));
20 108 $self->{additional} = Module::Setup::Path::Additional->new($self->path_to('additional'));
21  
22 108 $self;
23 }
24  
25 95 ▶sub config { shift->{config} }
Subroutine config: called CC=1 SCAR=0.0
Pod undocumented
26 138 ▶sub plugins { shift->{plugins} }
Subroutine plugins: called CC=1 SCAR=0.0
Pod undocumented
27 913 ▶sub template { shift->{template} }
Subroutine template: called CC=1 SCAR=0.0
Pod undocumented
28 219 ▶sub additional { shift->{additional} }
Subroutine additional: called CC=1 SCAR=0.0
Pod undocumented
29  
30 sub create_flavor {
31 0 ▶ my($self, $config) = @_;
Subroutine create_flavor: not called CC=1 SCAR=6.9
Pod undocumented
32  
33 0 $self->path->mkpath;
34 0 $self->plugins->path->mkpath;
35 0 $self->template->path->mkpath;
36 0 $self->additional->path->mkpath;
37 0 YAML::DumpFile($self->config->path, $config);
38 }
39  
40 40 1;
« blib/lib/Module/Setup/Path.pm ↑ Summary blib/lib/Module/Setup/Path/Additional.pm »