Dist/Zilla/PluginBundle/GEEKRUTH.pm

filter: Statementstmt 44.4% 20 / 45 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 13 MC/DCmcdc 0.0% 0 / 7 Subroutinesub 62.5% 5 / 8 Podpod 0.0% 0 / 2 totaltotal 30.8% 25 / 81 CC 10 SCAR 41.8
CC
10
Cov
31%
configure
110.0
version_range
2.0
__ANON__
2.0
CRAP 65.2
↑ Summary auto/share/module/Dist-Zilla-MintingProfile-GEEKRUTH/default/Module.pm »
1 package Dist::Zilla::PluginBundle::GEEKRUTH;
2 1 ▶use Modern::Perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 our $VERSION = '4.0004'; # VERSION
4 1 our $AUTHORITY = 'cpan:GEEKRUTH'; # AUTHORITY
5  
6 # ABSTRACT: Be like GeekRuthie when you build your dists
7  
8 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Dist::Zilla;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 with qw/
11 Dist::Zilla::Role::PluginBundle::Easy
12 Dist::Zilla::Role::PluginBundle::Config::Slicer
13 Dist::Zilla::Role::PluginBundle::PluginRemover
14 /;
15 1 ▶use Type::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶use Types::Standard qw/ Str ArrayRef /;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 0 ▶sub version_range {
Subroutine version_range: not called CC=1 SCAR=6.9
Pod undocumented
19 0 my ( $from, $to ) = @_;
20 0 return join ',', grep { not $_ % 2 } $from .. $to;
21 }
22  
23 has badge => (
24 isa => 'ArrayRef',
25 is => 'ro',
26 0 ▶ default => sub { [] },
Subroutine __ANON__: not called CC=1 SCAR=6.9
27 1 );
28  
29 0 ▶sub configure {
Subroutine configure: not called CC=10 SCAR=47.0
Pod undocumented
30 0 my ($self) = @_;
31 0 my $arg = $self->payload;
32  
33 0 ▶ my $release_branch = $arg->{release_branch} || 'releases';
Condition0%0/2
$arg->{'release_branch'} || 'releases'
l!l
00
MC/DC0%0/1
$arg->{'release_branch'} || 'releases'
$arg->{'release_branch'}
Truth table0%0/2
A
A= $arg->{'release_branch'}
Aresult
11
00
34 0 ▶ my $dev_branch = $arg->{dev_branch} || 'main';
Condition0%0/2
$arg->{'dev_branch'} || 'main'
l!l
00
MC/DC0%0/1
$arg->{'dev_branch'} || 'main'
$arg->{'dev_branch'}
Truth table0%0/2
A
A= $arg->{'dev_branch'}
Aresult
11
00
35 0 ▶ my $upstream = $arg->{upstream} || 'origin';
Condition0%0/2
$arg->{'upstream'} || 'origin'
l!l
00
MC/DC0%0/1
$arg->{'upstream'} || 'origin'
$arg->{'upstream'}
Truth table0%0/2
A
A= $arg->{'upstream'}
Aresult
11
00
36  
37 0 my %mb_args;
38 0 ▶ $mb_args{mb_class} = $arg->{mb_class} if $arg->{mb_class};
Branch: 1 branch
BranchTrueFalseTotal
if $arg->{"mb_class"} 0 0 0
39  
40 0 ▶ my $builder = $arg->{builder} || 'MakeMaker';
Condition0%0/2
$arg->{'builder'} || 'MakeMaker'
l!l
00
MC/DC0%0/1
$arg->{'builder'} || 'MakeMaker'
$arg->{'builder'}
Truth table0%0/2
A
A= $arg->{'builder'}
Aresult
11
00
41  
42 0 $self->add_plugins(
43 [ $builder, ( \%mb_args ) x ( $builder eq 'ModuleBuild' ) ] );
44 $self->add_plugins(
45 qw/
46 Git::Contributors
47 ContributorsFile
48 Test::Compile
49 CoalescePod
50 InstallGuide
51 Covenant
52 ContributorCovenant
53
54 Codeberg::Update
55 /,
56 [
57 'Codeberg::Meta' => {
58 remote => $upstream,
59 p3rl => 1,
60 metacpan => 0,
61 },
62 'SecurityPolicy' => {
63 'policy_class' => 'Software::Security::Policy::Individual'
64 },
65 ],
66 qw/
67 MetaYAML
68 MetaJSON
69 PodWeaver
70 License
71 /,
72 [
73 NextRelease => {
74 time_zone => 'America/New_York',
75 }
76 ],
77 qw/
78 MetaProvides::Package
79 MetaData::BuiltWith
80 Manifest
81 ManifestSkip
82 Git::GatherDir
83 PruneCruft
84 ExecDir
85 OurPkgVersion
86 INI::Baked
87 /,
88 [
89 Authority => {
90 authority => $arg->{authority} // 'cpan:GEEKRUTH',
91 locate_comment => 1,
92 }
93 ],
94 qw/ Test::ReportPrereqs /,
95 [
96 AutoPrereqs => {
97 skip => 'parent',
98 ( skip => $arg->{autoprereqs_skip} ) x !!$arg->{autoprereqs_skip}
99 }
100 0 ▶ ],
Condition0%0/2
$arg->{"authority"} // "cpan:GEEKRUTH"
l!l
00
MC/DC0%0/1
$arg->{"authority"} // "cpan:GEEKRUTH"
$arg->{"authority"}
Truth table0%0/2
A
A= $arg->{"authority"}
Aresult
11
00
101 qw/ Prereqs::Plugins
102 CheckChangesHasContent
103 ReadmeMarkdownFromPod
104 TestRelease
105 ConfirmRelease
106 Git::Check
107 CopyrightYearFromGit
108 /,
109 [
110 'Git::CommitBuild' => {
111 release_branch => $release_branch,
112 multiple_inheritance => 1,
113 }
114 ],
115 [
116 'Git::Tag' => {
117 tag_format => 'v%v',
118 branch => $release_branch
119 }
120 ],
121 );
122  
123 0 $self->add_plugins(
124 'PreviousVersion::Changelog',
125 [
126 'NextVersion::Semantic' => {
127 major => 'MAJOR, API CHANGES',
128 minor => 'MINOR, NEW FEATURES, ENHANCEMENTS',
129 revision => 'REVISION, BUG FIXES, DOCUMENTATION, STATISTICS',
130 format => '%d.%02d%02d',
131 }
132 ],
133 [
134 'ChangeStats::Git' => {
135 group => 'STATISTICS',
136 develop_branch => $dev_branch,
137 release_branch => $release_branch,
138 }
139 ],
140 'Git::Commit',
141 );
142  
143 0 ▶ if ( $ENV{FAKE} or $arg->{fake_release} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ENV{'FAKE'} or $arg->{'fake_release'}) { } 0 0 0
Condition0%0/3
$ENV{"FAKE"} or $arg->{"fake_release"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$ENV{"FAKE"} or $arg->{"fake_release"}
$ENV{"FAKE"} $arg->{"fake_release"}
Truth table0%0/3
A or B
A= $ENV{"FAKE"}B= $arg->{"fake_release"}
ABresult
1X1
011
000
144 0 $self->add_plugins('FakeRelease');
145 } else {
146 0 $self->add_plugins(
147 [
148 'Git::Push' => { push_to => join q{ }, $upstream, $dev_branch, $release_branch }
149 ],
150 qw/FakeRelease/,
151 );
152 }
153  
154 0 $self->add_plugins(
155 qw/
156 SchwartzRatio
157 RunExtraTests
158 /,
159 );
160  
161 0 ▶ if ( my $help_wanted = $arg->{help_wanted} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $help_wanted = $arg->{"help_wanted"}) 0 0 0
162 $self->add_plugins(
163 [
164 0 'HelpWanted' => { map { $_ => 1 } split q{ }, $help_wanted },
165 ]
166 );
167 }
168  
169 $self->add_plugins(
170 0 qw/CPANFile/,
171 [ 'MinimumPerl' => { default_version => '5.012' } ],
172 );
173  
174 0 $self->config_slice('mb_class');
175  
176 0 return;
177 }
178  
179 1 1;
180  
181 __END__
↑ Summary auto/share/module/Dist-Zilla-MintingProfile-GEEKRUTH/default/Module.pm »