blib/lib/Dist/Zilla/PluginBundle/Author/JQUELIN.pm

filter: Statementstmt 57.8% 22 / 38 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 53.8% 28 / 52 CC 5 SCAR 26.5
CC
5
Cov
50%
bundle_config
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 14.2
↑ Summary
1 #
2 # This file is part of Dist-Zilla-PluginBundle-Author-JQUELIN
3 #
4 # This software is copyright (c) 2010 by Jerome Quelin.
5 #
6 # This is free software; you can redistribute it and/or modify it under
7 # the same terms as the Perl 5 programming language system itself.
8 #
9 1 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 package Dist::Zilla::PluginBundle::Author::JQUELIN;
14 # ABSTRACT: Build & release a distribution like jquelin
15 1 $Dist::Zilla::PluginBundle::Author::JQUELIN::VERSION = '3.005';
16 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use Moose::Autobox;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 1 with 'Dist::Zilla::Role::PluginBundle';
20 1 with 'Dist::Zilla::Role::PluginBundle::Config::Slicer';
21  
22 0 ▶sub bundle_config {
Subroutine bundle_config: not called CC=5 SCAR=34.0
23 0 my ($self, $section) = @_;
24 0 my $arg = $section->{payload};
25  
26 # params for pod weaver
27 0 ▶ $arg->{weaver} ||= 'pod';
Condition0%0/2
$arg->{"weaver"} ||= "pod"
l!l
00
MC/DC0%0/1
$arg->{"weaver"} ||= "pod"
$arg->{"weaver"}
Truth table0%0/2
A
A= $arg->{"weaver"}
Aresult
11
00
28  
29 0 my @dirty = ( "Changes", "dist.ini", "README.mkdn" );
30 0 my @allow_dirty = ( allow_dirty => \@dirty );
31  
32 # long list of plugins
33 my @wanted = (
34 # -- static meta-information
35 [ 'Git::NextVersion' => {} ],
36  
37 # -- fetch & generate files
38 [ GatherDir => {} ],
39 [ 'Test::Compile' => {
40 ':version' => 1.100220
41 } ],
42 [ PodCoverageTests => {} ],
43 [ PodSyntaxTests => {} ],
44 [ 'Test::ReportPrereqs' => {} ],
45  
46 # -- remove some files
47 [ PruneCruft => {} ],
48 [ PruneFiles => { match => '~$' } ],
49 [ ManifestSkip => {} ],
50  
51 # -- get prereqs
52 [ AutoPrereqs => {} ],
53  
54 # -- munge files
55 [ ExtraTests => {} ],
56 [ NextRelease => {
57 ':version'=> 2.101230,
58 time_zone => 'Europe/Paris',
59 } ],
60 [ PkgVersion => {} ],
61 0 ▶ [ ( $arg->{weaver} eq 'task' ? 'TaskWeaver' : 'PodWeaver' ) => {} ],
Branch: 1 branch
BranchTrueFalseTotal
$arg->{'weaver'} eq 'task' ? : 0 0 0
62 [ Prepender => {
63 ':version' => 1.100130
64 } ],
65  
66 # -- dynamic meta-information
67 [ ExecDir => {} ],
68 [ ShareDir => {} ],
69 [ Bugtracker => {} ],
70 [ Homepage => {} ],
71 [ Repository => {} ],
72 [ 'MetaProvides::Package' => {} ],
73 [ MetaConfig => {} ],
74  
75 # -- generate meta files
76 [ HelpWanted => {} ],
77 [ License => {} ],
78 [ Covenant => {} ],
79 [ MetaYAML => {} ],
80 [ MetaJSON => {} ],
81 [ ModuleBuild => {} ],
82 [ Readme => {} ],
83 [ ReadmeAnyFromPod => { location => "root", type => "markdown" } ],
84 [ Manifest => {} ], # should come last
85  
86 # -- release
87 [ CheckChangeLog => {} ],
88 [ TestRelease => {} ],
89 [ "Git::Check" => { @allow_dirty } ],
90 [ "Git::Commit" => { @allow_dirty } ],
91 [ "Git::Tag" => {} ],
92 [ "Git::Push" => {} ],
93  
94 [ UploadToCPAN => {} ],
95 );
96  
97 # create list of plugins
98 0 my @plugins;
99 0 for my $wanted (@wanted) {
100 0 my ($plugin, $name, $arg);
101 0 ▶ if ( scalar(@$wanted) == 2 ) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @$wanted == 2) { } 0 0 0
102 0 ($plugin, $arg) = @$wanted;
103 0 $name = $plugin;
104 } else {
105 0 ($plugin, $name, $arg) = @$wanted;
106 }
107 0 my $class = "Dist::Zilla::Plugin::$plugin";
108 0 push @plugins, [ "$section->{name}/$name" => $class => $arg ];
109 }
110  
111 0 return @plugins;
112 }
113  
114  
115 1 __PACKAGE__->meta->make_immutable;
116 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
117 1 1;
118  
119 __END__
↑ Summary