CPAN/Maker/Bootstrapper/Role/ShowDefaults.pm

filter: Statementstmt 62.8% 22 / 35 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 87.5% 7 / 8 Podpod 0.0% 0 / 1 totaltotal 52.7% 29 / 55 CC 6 SCAR 29.9
CC
6
Cov
50%
cmd_show_defaults
42.0
BEGIN
1.0
BEGIN
1.0
CRAP 19.9
« Git/ReleaseDiffs.pm ↑ Summary CPAN/Maker/Bootstrapper/Role/DistFile.pm »
1 package CPAN::Maker::Bootstrapper::Role::ShowDefaults;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use CLI::Simple::Constants qw(:booleans);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use English qw(-no_match_vars);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use English;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use Role::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 ########################################################################
13 0 ▶sub cmd_show_defaults {
Subroutine cmd_show_defaults: not called CC=6 SCAR=37.4
Pod undocumented
14 ########################################################################
15 0 my ($self) = @_;
16  
17 0 my $installdir = $self->get_installdir;
18  
19 0 ▶ if ( !$installdir ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($installdir) 0 0 0
20 0 $installdir = sprintf '%s/{module-name}', $self->get_basedir;
21 }
22  
23 0 ▶ my @defaults = (
Branch: 1 branch
BranchTrueFalseTotal
$self->get_color ? : 0 0 0
24 [ config_source => $self->get_config ],
25 [ basedir => $self->get_basedir ],
26 [ installdir => $installdir ],
27 [ username => $self->get_username ],
28 [ email => $self->get_email ],
29 [ github_user => $self->get_github_user ],
30 [ resources => $self->get_resources ],
31 [ color => $self->get_color ? 'on' : 'off' ],
32 [ llm_api_key_helper => $self->get_llm_api_key_helper ],
33 [ max_tokens => $self->get_max_tokens ],
34 [ max_diff_files => $self->get_max_diff_files ],
35 );
36  
37 0 foreach my $default ( sort { $a->[0] cmp $b->[0] } @defaults ) {
38 0 my ( $name, $value ) = @{$default};
39  
40 0 ▶ if ( !defined $value || $value eq q{} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $value or $value eq "") 0 0 0
Condition0%0/3
not defined $value or $value eq ""
l!l&&r!l&&!r
000
MC/DC0%0/2
not defined $value or $value eq ""
not defined $value $value eq ""
Truth table0%0/3
not(A) or B
A= not defined $valueB= $value eq ""
ABresult
1X1
011
000
41 0 $value = '<not set>';
42 }
43  
44 0 printf "%-20s %s\n", $name, $value;
45 }
46  
47 0 return $SUCCESS;
48 }
49  
50 2 1;
« Git/ReleaseDiffs.pm ↑ Summary CPAN/Maker/Bootstrapper/Role/DistFile.pm »