lib/Module/Provision/Config.pm

filter: Statementstmt 75.0% 42 / 56 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 8 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 33.3% 5 / 15 Podpod n/a totaltotal 54.0% 47 / 87 CC 6 SCAR 11.6
CC
6
Cov
62%
__ANON__
9.6
__ANON__
4.3
__ANON__
3.7
CRAP 3.2
« blib/lib/auto/share/dist/Module-Provision/boilerplate_whitelist.pm ↑ Summary blib/lib/Module/Provision/MetaData.pm »
1 package Module::Provision::Config;
2  
3 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use Class::Usul::Constants qw( NUL TRUE );
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Class::Usul::Functions qw( fullname loginid logname untaint_cmdline
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 untaint_identifier );
8 1 ▶use File::DataClass::Types qw( ArrayRef HashRef NonEmptySimpleStr
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 Path SimpleStr Undef );
10 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 extends qw(Class::Usul::Config::Programs);
13  
14 # Object attributes (public)
15 has 'author' => is => 'lazy', isa => NonEmptySimpleStr,
16 0 ▶ builder => sub {
Subroutine __ANON__: not called CC=3 SCAR=22.6
17 0 ▶ my $author = untaint_cmdline $ENV{AUTHOR} || fullname || logname;
Condition0%0/6
&untaint_cmdline($ENV{'AUTHOR'}) || &fullname() || &logname()
l!l&&r!l&&!r
000
&untaint_cmdline($ENV{"AUTHOR"}) or &fullname()
l!l&&r!l&&!r
000
MC/DC0%0/3
&untaint_cmdline($ENV{'AUTHOR'}) || &fullname() || &logname()
&untaint_cmdline($ENV{"AUTHOR"}) &fullname() &logname()
Truth table0%0/4
A or B || C
A= &untaint_cmdline($ENV{"AUTHOR"})B= &fullname()C= &logname()
ABCresult
1XX1
01X1
0011
0000
18 0 $author =~ s{ [\'] }{\'}gmx; return $author };
19  
20 has 'author_email' => is => 'lazy', isa => NonEmptySimpleStr,
21 0 ▶ builder => sub {
Subroutine __ANON__: not called CC=2 SCAR=14.6
22 0 ▶ my $email = untaint_cmdline $ENV{EMAIL} || 'dave@example.com';
Condition0%0/2
&untaint_cmdline($ENV{'EMAIL'}) || 'dave@example.com'
l!l
00
MC/DC0%0/1
&untaint_cmdline($ENV{'EMAIL'}) || 'dave@example.com'
&untaint_cmdline($ENV{'EMAIL'})
Truth table0%0/2
A
A= &untaint_cmdline($ENV{'EMAIL'})
Aresult
11
00
23 0 $email =~ s{ [\'] }{\'}gmx; return $email };
24  
25 has 'author_id' => is => 'lazy', isa => NonEmptySimpleStr,
26 0 ▶ builder => sub { loginid };
Subroutine __ANON__: not called CC=1 SCAR=1.2
27  
28 has 'base' => is => 'lazy', isa => Path, coerce => TRUE,
29 0 ▶ builder => sub { $_[ 0 ]->my_home };
Subroutine __ANON__: not called CC=1 SCAR=1.2
30  
31 1 has 'builder' => is => 'lazy', isa => NonEmptySimpleStr,
32 default => 'MB';
33  
34 1 has 'coverage_server' => is => 'ro', isa => NonEmptySimpleStr,
35 default => 'http://localhost:5000/coverage';
36  
37 has 'default_branches' => is => 'lazy', isa => HashRef,
38 0 ▶ builder => sub { { git => 'master', svn => 'trunk' } };
Subroutine _build_default_branches: not called CC=1 SCAR=1.2
39  
40 has 'delete_files_uri' => is => 'lazy', isa => NonEmptySimpleStr,
41 0 ▶ builder => sub { untaint_cmdline $ENV{CPAN_DELETE_FILES_URI}
Subroutine __ANON__: not called CC=2 SCAR=13.0
42 0 ▶ || 'https://pause.perl.org/pause/authenquery' };
Branch: 1 branch
BranchTrueFalseTotal
&untaint_cmdline($ENV{"CPAN_DELETE_FILES_URI"}) or "https://pause.perl.org/pause/authenquery" 0 0 0
43  
44 has 'editor' => is => 'lazy', isa => NonEmptySimpleStr,
45 0 ▶ builder => sub { untaint_identifier $ENV{EDITOR} || 'emacs' };
Subroutine _build_editor: not called CC=2 SCAR=13.0
Branch: 1 branch
BranchTrueFalseTotal
&untaint_identifier($ENV{"EDITOR"}) or "emacs" 0 0 0
46  
47 1 has 'home_page' => is => 'lazy', isa => NonEmptySimpleStr,
48 default => 'http://example.com';
49  
50 has 'hooks' => is => 'lazy', isa => ArrayRef[NonEmptySimpleStr],
51 0 ▶ builder => sub { [ 'commit-msg', 'pre-commit' ] };
Subroutine __ANON__: not called CC=1 SCAR=1.2
52  
53 1 has 'license' => is => 'lazy', isa => NonEmptySimpleStr,
54 default => 'perl';
55  
56 1 has 'localdir' => is => 'ro', isa => NonEmptySimpleStr,
57 default => 'local';
58  
59 1 has 'min_perl_ver' => is => 'lazy', isa => NonEmptySimpleStr,
60 default => '5.010001';
61  
62 1 has 'module_abstract' => is => 'lazy', isa => NonEmptySimpleStr,
63 default => 'One-line description of the modules purpose';
64  
65 1 has 'pub_repo_prefix' => is => 'ro', isa => SimpleStr, default => 'p5-';
66  
67 1 has 'remote_test_id' => is => 'ro', isa => NonEmptySimpleStr,
68 default => 'test@testhost';
69  
70 1 has 'remote_script' => is => 'ro', isa => NonEmptySimpleStr,
71 default => 'install_perl_module';
72  
73 1 has 'repository' => is => 'lazy', isa => NonEmptySimpleStr,
74 default => 'repository';
75  
76 has 'seed_file' => is => 'lazy', isa => Path | Undef, coerce => TRUE,
77 0 ▶ builder => sub { [ qw( ~ .ssh pause.key ) ] };
Subroutine _build_seed_file: not called CC=1 SCAR=1.2
78  
79 1 has 'signing_key' => is => 'lazy', isa => SimpleStr,
80 default => NUL;
81  
82 1 has 'tag_message' => is => 'lazy', isa => NonEmptySimpleStr,
83 default => 'Releasing';
84  
85 1 has 'template_index' => is => 'lazy', isa => NonEmptySimpleStr,
86 default => 'index.json';
87  
88 has 'test_env_vars' => is => 'lazy', isa => ArrayRef,
89 documentation => 'Set these environment vars to true when testing',
90 0 ▶ builder => sub {
Subroutine _build_test_env_vars: not called CC=1 SCAR=1.2
91 0 [ qw( AUTHOR_TESTING TEST_MEMORY TEST_SPELLING ) ] };
92  
93 1 has 'vcs' => is => 'lazy', isa => NonEmptySimpleStr,
94 default => 'git';
95  
96 1 1;
97  
98 __END__
« blib/lib/auto/share/dist/Module-Provision/boilerplate_whitelist.pm ↑ Summary blib/lib/Module/Provision/MetaData.pm »