Dist/Zilla/Plugin/UsefulReadme.pm

filter: Statementstmt 96.5% 197 / 204 Branchbran 68.3% 41 / 60 Conditioncond 47.6% 10 / 21 MC/DCmcdc 23.0% 3 / 13 Subroutinesub 96.3% 52 / 54 Podpod 0.0% 0 / 8 totaltotal 84.1% 303 / 360 CC 46 SCAR 15.4
CC
46
Cov
87%
prune_files
17.3
__ANON__
12.0
_get_section
11.0
CRAP 4.7
« Pod/Weaver/Section/Requirements.pm ↑ Summary
1 package Dist::Zilla::Plugin::UsefulReadme;
2  
3 # ABSTRACT: generate a README file with the useful bits
4  
5 15 ▶use v5.24;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 15 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 15 with qw(
9 Dist::Zilla::Role::AfterBuild
10 Dist::Zilla::Role::AfterRelease
11 Dist::Zilla::Role::FileGatherer
12 Dist::Zilla::Role::FilePruner
13 Dist::Zilla::Role::PPI
14 Dist::Zilla::Role::PrereqSource
15 );
16  
17 15 ▶use Dist::Zilla 6.003;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 15 ▶use Dist::Zilla::File::InMemory;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 15 ▶use Hash::Ordered 0.005;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 15 ▶use List::Util 1.33 qw( first none pairs );
Subroutine BEGIN: called CC=1 SCAR=0.0
21 15 ▶use Module::Metadata 1.000015;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 15 ▶use Module::Runtime qw( use_module );
Subroutine BEGIN: called CC=1 SCAR=0.0
23 15 ▶use MooseX::MungeHas;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 15 ▶use Path::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 15 ▶use PPI::Token::Pod ();
Subroutine BEGIN: called CC=1 SCAR=0.0
26 15 ▶use Pod::Elemental;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 15 ▶use Pod::Elemental::Document;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 15 ▶use Pod::Elemental::Transformer::Pod5;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 15 ▶use Pod::Elemental::Transformer::Nester;
Subroutine BEGIN: called CC=1 SCAR=0.0
30 15 ▶use Pod::Elemental::Selectors;
Subroutine BEGIN: called CC=1 SCAR=0.0
31 15 ▶use Types::Common qw( ArrayRef Bool CodeRef Enum Maybe NonEmptyStr StrMatch );
Subroutine BEGIN: called CC=1 SCAR=0.0
32  
33 15 ▶use experimental qw( lexical_subs signatures );
Subroutine BEGIN: called CC=1 SCAR=0.0
34  
35 15 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
36  
37 15 our $VERSION = 'v0.6.0';
38  
39 15 ▶sub mvp_multivalue_args { qw( regions sections ) }
Subroutine mvp_multivalue_args: called CC=1 SCAR=0.0
Pod undocumented
40  
41 15 ▶sub mvp_aliases { return { region => 'regions', section => 'sections', fallback => 'section_fallback' } }
Subroutine mvp_aliases: called CC=1 SCAR=0.0
Pod undocumented
42  
43  
44 has source => (
45 is => 'lazy',
46 isa => NonEmptyStr,
47 6 ▶ builder => sub($self) {
Subroutine _build_source: called CC=2 SCAR=7.1
48 6 my $file = $self->zilla->main_module->name;
49 6 ( my $pod = $file ) =~ s/\.pm$/\.pod/;
50 6 ▶ return -e $pod ? $pod : $file;
Branch: 1 branch
BranchTrueFalseTotal
-e $pod ? : 0 6 6
51 }
52 15 );
53  
54 15 ▶sub _source_file($self) {
Subroutine _source_file: called CC=1 SCAR=0.0
55 15 my $filename = $self->source;
56 15 ▶ return first { $_->name eq $filename } $self->zilla->files->@*;
Subroutine __ANON__: called CC=1 SCAR=0.0
57 }
58  
59  
60 15 has phase => (
61 is => 'ro',
62 isa => Enum [qw(build release)],
63 default => 'build',
64 );
65  
66  
67 15 has location => (
68 is => 'ro',
69 isa => Enum [qw(build root)],
70 default => 'build',
71 );
72  
73  
74 15 has encoding => (
75 is => 'ro',
76 isa => NonEmptyStr,
77 default => 'utf8',
78 );
79  
80  
81 15 has section_fallback => (
82 is => 'ro',
83 isa => Bool,
84 default => 1,
85 );
86  
87  
88 has sections => (
89 is => 'ro',
90 isa => ArrayRef [NonEmptyStr],
91 2 ▶ builder => sub($self) {
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine _build_sections: called CC=1 SCAR=0.0
92 return [
93 2 map { s/_/ /gr }
94 qw(
95 name
96 status
97 synopsis
98 description
99 recent_changes
100 requirements
101 installation
102 security_considerations
103 /support|bugs/
104 source
105 /authors?/
106 /contributors?/
107 /copyright|license|copyright_and_license/
108 see_also
109 )
110 ];
111  
112 }
113 15 );
114  
115 15 my %CONFIG = (
116 pod => {
117 filename => 'README.pod',
118 prereqs => [],
119 },
120 text => {
121 filename => 'README',
122 prereqs => [
123 'Pod::Simple::Text' => '3.23',
124 ],
125 },
126 markdown => {
127 filename => 'README.mkdn',
128 prereqs => [
129 'Pod::Markdown' => '3.000',
130 ],
131 },
132 gfm => {
133 filename => 'README.md',
134 prereqs => [
135 'Pod::Markdown::Github' => 0,
136 ],
137 },
138 custom => {
139 filename => '', # the user will have to specify this
140 prereqs => [],
141 },
142 );
143  
144  
145 15 has type => (
146 is => 'ro',
147 isa => Enum [ keys %CONFIG ],
148 default => 'text',
149 );
150  
151  
152 has parser_class => (
153 is => 'lazy',
154 isa => Maybe[ StrMatch[ qr/^[^\W\d]\w*(?:::\w+)*\z/as ] ], # based on Params::Util _CLASS;
155 6 ▶ builder => sub($self) {
Subroutine _build_parser_class: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
156 6 return $CONFIG{ $self->type }{prereqs}[0];
157 }
158 15 );
159  
160 has _parser => (
161 is => 'lazy',
162 isa => CodeRef,
163 init_arg => undef,
164 10 ▶ builder => sub($self) {
Subroutine __ANON__: called CC=4 SCAR=13.9
Subroutine _build__parser: called CC=4 SCAR=13.9
165 10 my $prereqs = $CONFIG{ $self->type }{prereqs};
166 10 my $class = $self->parser_class;
167 10 ▶ if ($class) {
Branch: 2 branches
BranchTrueFalseTotal
if ($class) { } 6 4 10
if ($class) { } 4 10 14
168 6 ▶ if ( $class ne $prereqs->[0] ) {
Branch: 2 branches
BranchTrueFalseTotal
if ($class ne $prereqs->[0]) { } 0 6 6
if ($class ne $prereqs->[0]) { } 1 3 4
169 0 use_module($class);
170 }
171 else {
172 6 foreach my $prereq ( pairs $prereqs->@* ) {
173 6 use_module( $prereq->[0], $prereq->[1] );
174 }
175 }
176 10 ▶ return sub($pod) {
Subroutine __ANON__: called CC=1 SCAR=0.0
177 10 my $parser = $class->new();
178 10 $parser->output_string( \my $content );
179 10 $parser->parse_characters(1);
180 10 $parser->parse_string_document($pod);
181 10 return $content;
182 }
183 6 }
184 else {
185 5 ▶ return sub($pod) {
Subroutine __ANON__: called CC=1 SCAR=0.0
186 5 return $pod;
187 }
188 4 }
189 }
190 15 );
191  
192  
193 has filename => (
194 is => 'lazy',
195 isa => NonEmptyStr,
196 14 ▶ builder => sub($self) {
Subroutine __ANON__: called CC=1 SCAR=0.0
197 14 return $CONFIG{ $self->type }{filename};
198 }
199 15 );
200  
201  
202 has regions => (
203 is => 'lazy',
204 isa => ArrayRef [NonEmptyStr],
205 7 ▶ builder => sub($self) {
Subroutine _build_regions: called CC=1 SCAR=0.0
206 7 my @regions = qw( stopwords Pod::Coverage Test::MixedScripts );
207 7 return [ map { s/^://r } @regions, $CONFIG{ $self->type }{regions}->@* ];
208 }
209 15 );
210  
211  
212 15 has add_prereqs => (
213 is => 'ro',
214 isa => Bool,
215 default => 1,
216 );
217  
218 2 ▶around dump_config => sub( $orig, $self ) {
Subroutine __ANON__: called CC=2 SCAR=7.0
219 2 my $config = $self->$orig;
220 $config->{ +__PACKAGE__ } = {
221 (
222 2 ▶ map { $_ => $self->$_ }
Branch: 1 branch
BranchTrueFalseTotal
builtin::blessed($self) ne __PACKAGE__ ? : 0 2 2
223 qw( source phase location encoding section_fallback sections type parser_class filename regions )
224 ),
225 blessed($self) ne __PACKAGE__ ? ( version => $VERSION ) : (),
226 };
227 2 return $config;
228 15 };
229  
230 15 ▶sub gather_files($self) {
Subroutine gather_files: called CC=3 SCAR=11.6
Pod undocumented
231 15 my $filename = $self->filename;
232  
233 15 ▶ if ( ( $self->location eq 'build' )
Branch: 1 branch
BranchTrueFalseTotal
if ($self->location eq "build" and &none(sub { $_->name eq $filename; } , @{$self->zilla->files})) 15 0 15
Condition33%1/3
$self->location eq "build" and &none(sub { $_->name eq $filename; } , @{$self->zilla->files})
!ll&&!rl&&r
0015
MC/DC0%0/2
$self->location eq "build" and &none(sub { $_->name eq $filename; } , @{$self->zilla->files})
$self->location eq "build" &none(sub { $_->name eq $filename; } , @{$self->zilla->files})
Truth table33%1/3
A and B
A= $self->location eq "build"B= &none(sub { $_->name eq $filename; } , @{$self->zilla->files})
ABresult
0X0
100
111
234 64 ▶ && none { $_->name eq $filename } $self->zilla->files->@* )
Subroutine __ANON__: called CC=1 SCAR=0.0
235 {
236 15 my $file = Dist::Zilla::File::InMemory->new(
237 {
238 content => '', # placeholder
239 name => $self->filename,
240 }
241 );
242 15 $self->add_file($file);
243 }
244  
245 15 return;
246 }
247  
248 15 ▶sub register_prereqs($self) {
Subroutine register_prereqs: called CC=3 SCAR=11.0
Pod undocumented
249  
250 15 ▶ return unless $self->add_prereqs;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->add_prereqs 1 14 15
251  
252 14 ▶ if ( my $prereqs = $CONFIG{ $self->type }{prereqs} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $prereqs = $CONFIG{$self->type}{"prereqs"}) 14 0 14
253 14 $self->zilla->register_prereqs(
254 {
255 phase => 'develop',
256 type => 'requires',
257 },
258 ref($self) => 'v0.4.3', # baseline features and bug fixes
259 $prereqs->@*
260 );
261 }
262  
263 14 return;
264 }
265  
266 15 ▶sub prune_files($self) {
Subroutine prune_files: called CC=5 SCAR=28.5
Pod undocumented
267  
268 15 ▶ if ( $self->location eq "root"
Branch: 1 branch
BranchTrueFalseTotal
if ($self->location eq "root" and &none(sub { ref $self eq ref $_ and $_->location ne $self->location and $_->filename eq $self->filename; } , @{$self->zilla->plugins})) 0 15 15
Condition33%1/3
$self->location eq "root" and &none(sub { ref $self eq ref $_ and $_->location ne $self->location and $_->filename eq $self->filename; } , @{$self->zilla->plugins})
!ll&&!rl&&r
1500
MC/DC0%0/2
$self->location eq "root" and &none(sub { ref $self eq ref $_ and $_->location ne $self->location and $_->filename eq $self->filename; } , @{$self->zilla->plugins})
$self->location eq "root" &none(sub { ref $self eq ref $_ and $_->location ne $self->location and $_->filename eq $self->filename; } , @{$self->zilla->plugins})
Truth table33%1/3
A and B
A= $self->location eq "root"B= &none(sub { ref $self eq ref $_ and $_->location ne $self->location and $_->filename eq $self->filename; } , @{$self->zilla->plugins})
ABresult
0X0
100
111
269 0 ▶ && none { ref($self) eq ref($_) && $_->location ne $self->location && $_->filename eq $self->filename }
Subroutine __ANON__: not called CC=3 SCAR=24.8
Branch: 1 branch
BranchTrueFalseTotal
ref $self eq ref $_ and $_->location ne $self->location and $_->filename eq $self->filename 0 0 0
Condition0%0/3
ref $self eq ref $_ and $_->location ne $self->location
!ll&&!rl&&r
000
MC/DC0%0/2
ref $self eq ref $_ and $_->location ne $self->location
ref $self eq ref $_ $_->location ne $self->location
Truth table0%0/3
A and B
A= ref $self eq ref $_B= $_->location ne $self->location
ABresult
0X0
100
111
270 $self->zilla->plugins->@* )
271 {
272 0 for my $file ( $self->zilla->files->@* ) {
273 0 ▶ next unless $file->name eq $self->filename;
Branch: 1 branch
BranchTrueFalseTotal
unless $file->name eq $self->filename 0 0 0
274 0 $self->log_debug( [ 'pruning %s', $file->name ] );
275 0 $self->zilla->prune_file($file);
276 }
277 }
278  
279 15 return;
280 }
281  
282 15 ▶sub after_build( $self, $build ) {
Subroutine after_build: called CC=3 SCAR=11.7
Pod undocumented
283 # Updating the content of the file after the build has no effect, so we update the actual file on disk
284 15 ▶ if ( $self->phase eq 'build' ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->phase eq "build") 15 0 15
285 15 ▶ my $dir = $self->location eq "build" ? $build->{build_root} : $self->zilla->root;
Branch: 1 branch
BranchTrueFalseTotal
$self->location eq 'build' ? : 15 0 15
286 15 $self->_create_readme($dir);
287 }
288 }
289  
290 0 ▶sub after_release( $self, @ ) {
Subroutine after_release: not called CC=2 SCAR=17.9
Pod undocumented
291 0 ▶ $self->_create_readme( $self->zilla->root ) if $self->phase eq 'release';
Branch: 1 branch
BranchTrueFalseTotal
if $self->phase eq "release" 0 0 0
292 }
293  
294 15 ▶sub _create_readme( $self, $dir ) {
Subroutine _create_readme: called CC=1 SCAR=0.0
295 15 my $file = path( $dir, $self->filename );
296 15 $file->spew_raw( $self->_generate_readme_content );
297 }
298  
299 15 ▶sub _generate_readme_content($self) {
Subroutine _generate_readme_content: called CC=1 SCAR=0.0
300 15 return $self->_parser->( $self->_generate_raw_pod );
301 }
302  
303 15 ▶sub _generate_raw_pod($self) {
Subroutine _generate_raw_pod: called CC=9 SCAR=22.0
304  
305 # We need to extract the POD from the source file
306  
307 15 my $ppi = $self->ppi_document_for_file( $self->_source_file );
308 15 ▶ my $pods = $ppi->find('PPI::Token::Pod') or return;
Branch: 1 branch
BranchTrueFalseTotal
my $pods = $ppi->find("PPI::Token::Pod") or return 15 0 15
309 15 my $bytes = PPI::Token::Pod->merge( $pods->@* );
310  
311 # Then we need to parse the POD and transform that into a list of =head1 sections
312  
313 15 my $doc = Pod::Elemental->read_string($bytes);
314 15 Pod::Elemental::Transformer::Pod5->new->transform_node($doc);
315  
316 15 my %regions = map { $_ => 1 } $self->regions->@*;
317  
318 my $nester = Pod::Elemental::Transformer::Nester->new(
319 {
320 top_selector => Pod::Elemental::Selectors::s_command('head1'),
321 content_selectors => [
322 Pod::Elemental::Selectors::s_flat(),
323 Pod::Elemental::Selectors::s_command( [qw(head2 head3 head4 over item back pod cut)] ),
324 62 ▶ sub($para) {
Subroutine __ANON__: called CC=3 SCAR=11.1
325 62 ▶ return $para && $para->isa("Pod::Elemental::Element::Pod5::Region") && $regions{ $para->format_name };
Condition83%5/6
$para && $para->isa('Pod::Elemental::Element::Pod5::Region') && $regions{$para->format_name}
!ll&&!rl&&r
5651
$para and $para->isa("Pod::Elemental::Element::Pod5::Region")
!ll&&!rl&&r
0566
MC/DC66%2/3
$para && $para->isa('Pod::Elemental::Element::Pod5::Region') && $regions{$para->format_name}
$para $para->isa("Pod::Elemental::Element::Pod5::Region") $regions{$para->format_name}
Truth table75%3/4
A and B && C
A= $paraB= $para->isa("Pod::Elemental::Element::Pod5::Region")C= $regions{$para->format_name}
ABCresult
0XX0
10X0
1100
1111
326 }
327 15 ],
328 },
329 );
330 15 $nester->transform_node($doc);
331 15 my @nodes = $doc->children->@*;
332  
333 15 my $sections = Hash::Ordered->new;
334 15 for my $sec ( grep { Pod::Elemental::Selectors::s_command( head1 => $_ ) } @nodes ) {
335 72 my $heading = fc( $sec->content );
336 72 ▶ next if $sections->exists($heading);
Branch: 1 branch
BranchTrueFalseTotal
if $sections->exists($heading) 6 66 72
337 66 $sections->set( $heading => [$sec] );
338 }
339  
340 15 ▶ for my $readme ( grep { Pod::Elemental::Selectors::s_command( begin => $_ ) && $_->format_name =~ /^:?readme$/ } @nodes ) {
Condition66%2/3
Pod::Elemental::Selectors::s_command('begin', $_) && $_->format_name =~ /^:?readme$/u
!ll&&!rl&&r
7507
MC/DC50%1/2
Pod::Elemental::Selectors::s_command('begin', $_) && $_->format_name =~ /^:?readme$/u
Pod::Elemental::Selectors::s_command('begin', $_) $_->format_name =~ /^:?readme$/u
Truth table66%2/3
A && B
A= Pod::Elemental::Selectors::s_command('begin', $_)B= $_->format_name =~ /^:?readme$/u
ABresult
0X0
100
111
341 7 my ( $found, @children ) = $readme->children->@*;
342  
343 7 ▶ if ( Pod::Elemental::Selectors::s_command( head1 => $found ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (Pod::Elemental::Selectors::s_command("head1", $found)) 7 0 7
344 7 my $heading = fc( $found->content );
345 7 ▶ next if $sections->exists($heading);
Branch: 1 branch
BranchTrueFalseTotal
if $sections->exists($heading) 0 7 7
346 7 ▶ unshift @children, $found unless $heading =~ /\A(?:append|prepend):/;
Branch: 1 branch
BranchTrueFalseTotal
unless $heading =~ /\A(?:append|prepend):/u 2 5 7
347 7 $sections->set( $heading => \@children );
348 }
349 }
350  
351 142 ▶ my sub _get_section($heading) {
Subroutine _get_section: called CC=11 SCAR=24.0
352 142 ▶ if ( my $pod = $sections->get( fc $heading ) ) {
Branch: 3 branches
BranchTrueFalseTotal
if (my $pod = $sections->get(fc $heading)) { } 27 115 142
elsif (my($re) = $heading =~ m[\A/(.+)/\z]u) { } 38 77 115
elsif ($self->section_fallback) { } 76 1 77
353 27 return $pod->@*;
354 }
355 elsif ( my ($re) = $heading =~ m|\A/(.+)/\z| ) {
356 38 ▶ my $check = sub($key) { return $key =~ qr/\A(?:${re})\z/i };
Subroutine __ANON__: called CC=1 SCAR=0.0
357 38 for my $key ( $sections->keys ) {
358 173 ▶ if ( $check->($key) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (&$check($key)) 13 160 173
359 13 ▶ if ( $pod = $sections->get($key) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pod = $sections->get($key)) 13 0 13
360 13 return $pod->@*;
361 }
362 }
363 }
364 }
365 elsif ( $self->section_fallback ) {
366 76 my $method = sprintf( '_generate_pod_for_%s', lc( $heading =~ s/\W+/_/gr ) );
367 76 ▶ if ( $self->can($method) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->can($method)) 31 45 76
368 31 ▶ my ($pod) = $self->$method or return;
Branch: 1 branch
BranchTrueFalseTotal
my($pod) = $self->$method or return 26 5 31
369 26 ▶ if ( my $pre = $sections->get( "prepend:" . fc($heading) ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $pre = $sections->get('prepend:' . fc($heading))) 3 23 26
370 3 unshift $pod->children->@*, $pre->@*;
371 }
372 26 ▶ if ( my $post = $sections->get( "append:" . fc($heading) ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $post = $sections->get('append:' . fc($heading))) 2 24 26
373 2 push $pod->children->@*, $post->@*;
374 }
375 26 return ($pod);
376 }
377 }
378  
379 71 return;
380 }
381  
382 15 my $preamble = "=encoding " . $self->encoding . "\n";
383 return join(
384 "\n",
385 $preamble, #
386 79 map { $_->as_pod_string } #
387 15 map { _get_section($_) } #
388 $self->sections->@*
389 );
390 }
391  
392 31 ▶sub _fake_weaver_section( $self, $class, $args = { } ) {
Subroutine _fake_weaver_section: called CC=2 SCAR=6.9
393  
394 # Note: ideally we would add these as development requirements but by the time this is run (after building or
395 # release), the requirements have already been finalized.
396  
397 # RECOMMEND PREREQ: Pod::Weaver 4.016
398 31 use_module("Pod::Weaver");
399 31 use_module($class);
400  
401 31 my $zilla = $self->zilla;
402  
403 31 my $doc = Pod::Elemental::Document->new;
404  
405 31 my $weaver = Pod::Weaver->new_with_default_config;
406 31 my $section = $class->new( plugin_name => ref($self), weaver => $weaver, logger => $zilla->logger );
407 31 $section->weave_section( $doc, { zilla => $zilla, filename => $zilla->main_module->name, $args->%* } );
408  
409 31 return $doc->children->@*;
410 }
411  
412 1 ▶sub _generate_pod_for_version($self) {
Subroutine _generate_pod_for_version: called CC=1 SCAR=0.0
413 # RECOMMEND PREREQ: Pod::Weaver::Section::Version
414 1 return $self->_fake_weaver_section( "Pod::Weaver::Section::Version", { version => $self->zilla->version } );
415 }
416  
417 10 ▶sub _generate_pod_for_installation($self) {
Subroutine _generate_pod_for_installation: called CC=1 SCAR=0.0
418 10 return $self->_fake_weaver_section( "Pod::Weaver::Section::InstallationInstructions" );
419 }
420  
421 10 ▶sub _generate_pod_for_requirements($self) {
Subroutine _generate_pod_for_requirements: called CC=1 SCAR=0.0
422 10 my $file = $self->zilla->main_module;
423 10 return $self->_fake_weaver_section(
424 "Pod::Weaver::Section::Requirements",
425 {
426 ppi_document => $self->ppi_document_for_file($file),
427 }
428 );
429 }
430  
431 10 ▶sub _generate_pod_for_recent_changes($self) {
Subroutine _generate_pod_for_recent_changes: called CC=1 SCAR=0.0
432 10 return $self->_fake_weaver_section( "Pod::Weaver::Section::RecentChanges", { version => $self->zilla->version } );
433 }
434  
435  
436 15 ▶sub BUILD( $self, $ ) {
Subroutine BUILD: called CC=3 SCAR=14.2
Pod undocumented
437  
438 15 ▶ $self->log_fatal("Cannot use location='build' with phase='release'")
Branch: 1 branch
BranchTrueFalseTotal
if $self->location eq "build" and $self->phase eq "release" 0 15 15
Condition33%1/3
$self->location eq "build" and $self->phase eq "release"
!ll&&!rl&&r
0150
MC/DC0%0/2
$self->location eq "build" and $self->phase eq "release"
$self->location eq "build" $self->phase eq "release"
Truth table33%1/3
A and B
A= $self->location eq "build"B= $self->phase eq "release"
ABresult
0X0
100
111
439 if $self->location eq 'build' and $self->phase eq 'release';
440  
441 }
442  
443 15 __PACKAGE__->meta->make_immutable;
444  
445 __END__
« Pod/Weaver/Section/Requirements.pm ↑ Summary