blib/lib/Dist/Zilla/PluginBundle/BAREFOOT.pm

filter: Statementstmt 88.8% 135 / 152 Branchbran 27.2% 6 / 22 Conditioncond 25.0% 3 / 12 MC/DCmcdc 0.0% 0 / 6 Subroutinesub 89.3% 42 / 47 Podpod 0.0% 0 / 1 totaltotal 77.5% 186 / 240 CC 18 SCAR 10.3
CC
18
Cov
77%
__ANON__
9.0
__ANON__
9.0
__ANON__
9.0
CRAP 2.8
↑ Summary blib/lib/Pod/Weaver/Section/LegalWithAddendum.pm »
1 2 ▶use 5.012;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use MooseX::Declare;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use Method::Signatures::Modifiers;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 class Dist::Zilla::PluginBundle::BAREFOOT with Dist::Zilla::Role::PluginBundle::Easy
6 2 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.1
7 2 ▶ use autodie 2.00 ;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶ use PerlX::Maybe 0.003 'provided' ;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶ use List::MoreUtils 'uniq' ;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶ use MooseX::Has::Sugar ;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 ▶ use MooseX::Types::Moose ':all' ;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶ use MooseX::ClassAttribute ;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 # Dependencies
15 2 ▶ use Dist::Zilla 4.3 ; # authordeps
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 # supplies: Git::Check, Git::Commit, Git::NextVersion, Git::Push, Git::Tag
18 2 ▶ use Dist::Zilla::PluginBundle::Git 2.013 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 2 ▶ use Dist::Zilla::Plugin::PodWeaver ();
Subroutine BEGIN: called CC=1 SCAR=0.0
21 2 ▶ use Dist::Zilla::Plugin::GithubMeta 0.10 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
22 2 ▶ use Dist::Zilla::Plugin::Bugtracker 1.102670 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 ▶ use Dist::Zilla::Plugin::MetaNoIndex ();
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶ use Dist::Zilla::Plugin::MinimumPerl ();
Subroutine BEGIN: called CC=1 SCAR=0.0
25 2 ▶ use Dist::Zilla::Plugin::OurPkgVersion 0.001008 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
26 2 ▶ use Dist::Zilla::Plugin::ReadmeFromPod ();
Subroutine BEGIN: called CC=1 SCAR=0.0
27 2 ▶ use Dist::Zilla::Plugin::Test::Version ();
Subroutine BEGIN: called CC=1 SCAR=0.0
28 2 ▶ use Dist::Zilla::Plugin::CheckExtraTests ();
Subroutine BEGIN: called CC=1 SCAR=0.0
29 2 ▶ use Dist::Zilla::Plugin::InsertCopyright 0.001 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
30 2 ▶ use Dist::Zilla::Plugin::ReadmeAnyFromPod 0.120051 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
31 2 ▶ use Dist::Zilla::Plugin::Test::PodSpelling 2.001002 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
32 2 ▶ use Dist::Zilla::Plugin::CopyFilesFromBuild ();
Subroutine BEGIN: called CC=1 SCAR=0.0
33 2 ▶ use Dist::Zilla::Plugin::CheckPrereqsIndexed 0.002 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
34 2 ▶ use Dist::Zilla::Plugin::CheckVersionIncrement 0.121750 ();
Subroutine BEGIN: called CC=1 SCAR=0.0
35 #use Dist::Zilla::Plugin::MetaProvides::Package 1.14 (); # hides DB/main/private packages
36 2 ▶ use Dist::Zilla::Plugin::MetaProvides::Class 2.001 (); # adds 'provides' to META.* for `class`
Subroutine BEGIN: called CC=1 SCAR=0.0
37 2 ▶ use Dist::Zilla::Plugin::PodnameFromClassname (); # stops Pod::Weaver from complaining
Subroutine BEGIN: called CC=1 SCAR=0.0
38 2 ▶ use Dist::Zilla::Plugin::CheckChangesHasContent ();
Subroutine BEGIN: called CC=1 SCAR=0.0
39  
40  
41 2 our $VERSION = '0.05_01'; # TRIAL VERSION
42  
43 2 my @dirty_files = qw< dist.ini Changes >;
44 2 my @exclude_generated_files = qw< README.pod META.json >;
45  
46 class_has weaver_payload => ( ro, writer => '_store_weaver_data', isa => HashRef, lazy,
47 0 ▶ default => sub { die "class attribute weaver_payload called too soon!" }, );
Subroutine __ANON__: not called CC=1 SCAR=1.2
48  
49  
50 1 ▶ sub mvp_multivalue_args { qw/stopwords/ }
Subroutine mvp_multivalue_args: called CC=1 SCAR=0.0
Pod undocumented
51  
52 0 ▶ has stopwords => ( ro, isa => ArrayRef, lazy, default => method { $self->payload->{'stopwords'} // [] } );
Subroutine __ANON__: not called CC=3 SCAR=22.0
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 0 0
Condition0%0/2
$self->payload->{"stopwords"} // []
l!l
00
MC/DC0%0/1
$self->payload->{"stopwords"} // []
$self->payload->{"stopwords"}
Truth table0%0/2
A
A= $self->payload->{"stopwords"}
Aresult
11
00
53 2 ▶ has fake_release => ( ro, isa => Bool, lazy, default => method { $self->payload->{'fake_release'} } );
Subroutine __ANON__: called CC=2 SCAR=7.0
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 1 1
54 2 has no_spellcheck => ( ro, isa => Bool, default => 0 );
55 2 ▶ has auto_prereq => ( ro, isa => Bool, lazy, default => method { $self->payload->{'auto_prereq'} // 1 } );
Subroutine __ANON__: called CC=3 SCAR=11.4
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 1 1
Condition50%1/2
$self->payload->{"auto_prereq"} // 1
l!l
01
MC/DC0%0/1
$self->payload->{"auto_prereq"} // 1
$self->payload->{"auto_prereq"}
Truth table50%1/2
A
A= $self->payload->{"auto_prereq"}
Aresult
11
00
56 2 ▶ has tag_format => ( ro, isa => Str, lazy, default => method { $self->payload->{'tag_format'} // 'v%v' } );
Subroutine __ANON__: called CC=3 SCAR=11.4
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 1 1
Condition50%1/2
$self->payload->{"tag_format"} // "v%v"
l!l
01
MC/DC0%0/1
$self->payload->{"tag_format"} // "v%v"
$self->payload->{"tag_format"}
Truth table50%1/2
A
A= $self->payload->{"tag_format"}
Aresult
11
00
57 0 ▶ has version_regexp => ( ro, isa => Str, lazy, default => method { $self->payload->{'version_regexp'} // '^v(.+)$' } );
Subroutine __ANON__: not called CC=3 SCAR=22.0
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 0 0
Condition0%0/2
$self->payload->{"version_regexp"} // "^v(.+)\$"
l!l
00
MC/DC0%0/1
$self->payload->{"version_regexp"} // "^v(.+)\$"
$self->payload->{"version_regexp"}
Truth table0%0/2
A
A= $self->payload->{"version_regexp"}
Aresult
11
00
58 2 ▶ has git_remote => ( ro, isa => Str, lazy, default => method { $self->payload->{'git_remote'} // 'origin' } );
Subroutine __ANON__: called CC=3 SCAR=11.4
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 1 1
Condition50%1/2
$self->payload->{"git_remote"} // "origin"
l!l
01
MC/DC0%0/1
$self->payload->{"git_remote"} // "origin"
$self->payload->{"git_remote"}
Truth table50%1/2
A
A= $self->payload->{"git_remote"}
Aresult
11
00
59 0 ▶ has legal_addendum => ( ro, isa => Str, lazy, default => method { $self->payload->{'legal_addendum'} // '' } );
Subroutine __ANON__: not called CC=3 SCAR=22.0
Branch: 1 branch
BranchTrueFalseTotal
if scalar @_ > 0 0 0 0
Condition0%0/2
$self->payload->{"legal_addendum"} // ""
l!l
00
MC/DC0%0/1
$self->payload->{"legal_addendum"} // ""
$self->payload->{"legal_addendum"}
Truth table0%0/2
A
A= $self->payload->{"legal_addendum"}
Aresult
11
00
60  
61  
62 method configure
63 0 ▶ {
Subroutine BEGIN: called CC=1 SCAR=1.6
Subroutine __ANON__: not called CC=3 SCAR=15.3
Subroutine configure: called CC=3 SCAR=15.3
Branch: 2 branches
BranchTrueFalseTotal
if scalar @_ > 0 0 0 0
if scalar @_ > 0 0 1 1
64 0 my @push_to = uniq 'origin', $self->git_remote;
65  
66 0 ▶ $self->add_plugins (
Branch: 2 branches
BranchTrueFalseTotal
$self->fake_release ? : 0 0 0
$self->fake_release ? : 1 0 1
67  
68 # version number
69 #[ 'Git::NextVersion' => { first_version => '0.01', version_regexp => $self->version_regexp } ],
70  
71 # gather and prune
72 [ GatherDir => { exclude_filename => [@exclude_generated_files] }],# core
73 #PruneCruft => # core
74 #ManifestSkip => # core
75  
76 provided $self->auto_prereq,
77 [ AutoPrereqs => { skip => "^t::lib" } ],
78 #
79 # file munging
80 OurPkgVersion =>
81 PodnameFromClassname =>
82 #InsertCopyright =>
83 [ PodWeaver => { config_plugin => '@BAREFOOT', } ],
84  
85 # generated distribution files
86 License => # core
87 [ ReadmeAnyFromPod => { # generate in root for github, etc.
88 type => 'pod',
89 filename => 'README.pod',
90 location => 'root',
91 }
92 ],
93 [ Bugtracker => { web => 'http://github.com/barefootcoder/%l/issues' } ],
94  
95 # # generated xt/ tests
96 #provided not $self->no_spellcheck,
97 # [ 'Test::PodSpelling' => { stopwords => $self->stopwords } ],
98 # MetaTests => # core
99 # PodSyntaxTests => # core
100 # PodCoverageTests => # core
101 # 'Test::Version' =>
102  
103 # metadata
104 #MinimumPerl =>
105 [ GithubMeta => { remote => $self->git_remote } ],
106 #[ MetaNoIndex => {
107 # directory => [qw< t xt examples corpus >],
108 # package => [qw< DB >]
109 # }
110 #],
111 #[ 'MetaProvides::Package' => { meta_noindex => 1 } ],
112 [ 'MetaProvides::Class' => { inherit_version => 1 } ], # AFTER MetaNoIndex
113 #MetaYAML => # core
114 MetaJSON => # core
115  
116 # build system
117 ExecDir => # core
118 ShareDir => # core
119 MakeMaker => # core
120  
121 # manifest -- must come after all generated files
122 Manifest => # core
123  
124 # before release
125 [ 'Git::Check' => {
126 allow_dirty => [@dirty_files, @exclude_generated_files]
127 }
128 ],
129 CheckVersionIncrement =>
130 #CheckPrereqsIndexed =>
131 CheckChangesHasContent =>
132 #CheckExtraTests =>
133 TestRelease => # core
134 ConfirmRelease => # core
135  
136 # release
137 $self->fake_release
138 ? 'FakeRelease'
139 : 'UploadToCPAN', # core
140  
141 # after release
142 # Note -- NextRelease is here to get the ordering right with
143 # git actions. It is *also* a file munger that acts earlier.
144  
145 [ 'Git::Tag' => {
146 tag_format => $self->tag_format,
147 tag_message => 'version %v for CPAN',
148 }
149 ],
150 # bumps Changes
151 NextRelease => # core (also munges files)
152 # commit dirty Changes, dist.ini, README.pod
153 [ 'Git::Commit' =>
154 {
155 allow_dirty => [@dirty_files],
156 commit_msg => "packaging for CPAN: %v",
157 }
158 ],
159  
160 [ 'Git::Push' => { push_to => [@push_to] } ],
161  
162 );
163  
164 0 my @weaver_params = qw< repository_link >;
165 0 $self->_store_weaver_data({ map { $_ => $self->payload->{$_} } @weaver_params });
166  
167 2 }
168  
169 2 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
170  
171 1 1;
172  
173 # ABSTRACT: Dist::Zilla configuration the way BAREFOOT does it
174 # COPYRIGHT
175  
176 __END__
↑ Summary blib/lib/Pod/Weaver/Section/LegalWithAddendum.pm »