blib/lib/Pod/Weaver/PluginBundle/Author/CSSON.pm

filter: Statementstmt 58.9% 23 / 39 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 77.7% 7 / 9 Podpod 0.0% 0 / 2 totaltotal 49.1% 30 / 61 CC 7 SCAR 32.9
CC
7
Cov
48%
mvp_bundle_config
56.0
xp
2.0
BEGIN
1.0
CRAP 26.7
↑ Summary
1 2 ▶use 5.10.1;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Pod::Weaver::PluginBundle::Author::CSSON;
6  
7 # ABSTRACT: Weave Pod like CSSON
8 2 our $AUTHORITY = 'cpan:CSSON'; # AUTHORITY
9 2 our $VERSION = '0.1101';
10  
11 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 2 ▶use Pod::Weaver::Config::Assembler;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 2 ▶use Path::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 0 ▶sub xp {
Subroutine xp: not called CC=1 SCAR=6.9
Pod undocumented
17 0 Pod::Weaver::Config::Assembler->expand_package(shift);
18 }
19  
20 0 ▶sub mvp_bundle_config {
Subroutine mvp_bundle_config: not called CC=7 SCAR=40.3
Pod undocumented
21 0 my @plugins = ();
22  
23 # check git config
24 0 my $include_default_github = 0;
25 0 my $git_config = path('.git/config');
26 0 ▶ if($git_config->exists) {
Branch: 1 branch
BranchTrueFalseTotal
if ($git_config->exists) 0 0 0
27 0 my $git_config_contents = $git_config->slurp_utf8;
28 0 ▶ if($git_config_contents =~ m{github\.com:([^/]+)/(.+)\.git}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($git_config_contents =~ m[github\.com:([^/]+)/(.+)\.git]) { } 0 0 0
29 0 $include_default_github = 1;
30 }
31 else {
32 0 warn ('[PW/@Author: ] No github url found');
33 }
34 }
35  
36 0 push @plugins => (
37 ['@Author::CSSON/CorePrep', xp('@CorePrep'), { } ],
38 ['@Author::CSSON/SingleEncoding', xp('-SingleEncoding'), { } ],
39 ['@Author::CSSON/Name', xp('Name'), { } ],
40 ['@Author::CSSON/Version', xp('Version'), { format => q{Version %v, released %{YYYY-MM-dd}d.} } ],
41 ['@Author::CSSON/Prelude', xp('Region'), { region_name => 'prelude' } ],
42 );
43  
44 0 foreach my $plugin (qw/Synopsis Description Overview Stability/) {
45 0 push @plugins => ['@Author::CSSON/'.$plugin, xp('Generic'), { header => uc $plugin } ];
46 }
47  
48 0 foreach my $plugin ( ['Attributes', 'attr'],
49 ['Methods', 'method'],
50 ['Functions', 'func'],
51 ) {
52 0 push @plugins => [ $plugin->[0], xp('Collect'), { command => $plugin->[1], header => uc $plugin->[0] } ];
53 }
54 push @plugins => (
55 ['@Author::CSSON/Leftovers', xp('Leftovers'), { } ],
56 ['@Author::CSSON/postlude', xp('Region'), { } ],
57 (
58 0 ▶ !$ENV{'ILLER_MINTING'} && $include_default_github ?
Branch: 1 branch
BranchTrueFalseTotal
!$ENV{'ILLER_MINTING'} && $include_default_github ? : 0 0 0
Condition0%0/3
not $ENV{"ILLER_MINTING"} and $include_default_github
!ll&&!rl&&r
000
MC/DC0%0/2
not $ENV{"ILLER_MINTING"} and $include_default_github
not $ENV{"ILLER_MINTING"} $include_default_github
Truth table0%0/3
not(A) and B
A= not $ENV{"ILLER_MINTING"}B= $include_default_github
ABresult
0X0
100
111
59 ['@Author::CSSON/Source::DefaultGitHub', xp('Source::DefaultGitHub'), { text => 'L<%s>' } ]
60 :
61 ()
62 ),
63 ['@Author::CSSON/Homepage::DefaultCPAN', xp('Homepage::DefaultCPAN'), { text => 'L<%s>' } ],
64 ['@Author::CSSON/Authors', xp('Authors'), { } ],
65 ['@Author::CSSON/Legal', xp('Legal'), { } ],
66  
67 ['@Author::CSSON/List', xp('-Transformer'), { transformer => 'List' } ],
68 ['@Author::CSSON/Splint', xp('-Transformer'), { transformer => 'Splint' } ],
69 );
70  
71 0 return @plugins;
72 }
73  
74 2 1;
75  
76 __END__
↑ Summary