| 1 | package Dist::Zilla::PluginBundle::Author::ALEXBIO; | ||||||||||||
| 2 | { | ||||||||||||
| 3 | 1 | $Dist::Zilla::PluginBundle::Author::ALEXBIO::VERSION = '2.07'; | |||||||||||
| 4 | } | ||||||||||||
| 5 | |||||||||||||
| 6 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 1 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | 1 | ▶ | use Dist::Zilla; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 11 | |||||||||||||
| 12 | 1 | with 'Dist::Zilla::Role::PluginBundle::Easy'; | |||||||||||
| 13 | |||||||||||||
| 14 | has 'repo' => ( | ||||||||||||
| 15 | is => 'ro', | ||||||||||||
| 16 | isa => 'Maybe[Str]', | ||||||||||||
| 17 | lazy => 1, | ||||||||||||
| 18 | 0 | ▶ | default => sub { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 19 | defined $_[0] -> payload -> {repo} ? | ||||||||||||
| 20 | $_[0] -> payload -> {repo} : undef | ||||||||||||
| 21 | 0 | ▶ | } | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 22 | 1 | ); | |||||||||||
| 23 | |||||||||||||
| 24 | has 'makemaker' => ( | ||||||||||||
| 25 | is => 'ro', | ||||||||||||
| 26 | isa => 'Bool', | ||||||||||||
| 27 | lazy => 1, | ||||||||||||
| 28 | 0 | ▶ | default => sub { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 29 | defined $_[0] -> payload -> {makemaker} ? | ||||||||||||
| 30 | 0 | ▶ | $_[0] -> payload -> {makemaker} : 1 | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 31 | } | ||||||||||||
| 32 | 1 | ); | |||||||||||
| 33 | |||||||||||||
| 34 | has 'fake_release' => ( | ||||||||||||
| 35 | is => 'ro', | ||||||||||||
| 36 | isa => 'Bool', | ||||||||||||
| 37 | lazy => 1, | ||||||||||||
| 38 | 0 | ▶ | default => sub { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 39 | defined $_[0] -> payload -> {fake_release} ? | ||||||||||||
| 40 | 0 | ▶ | $_[0] -> payload -> {fake_release} : 0 | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 41 | } | ||||||||||||
| 42 | 1 | ); | |||||||||||
| 43 | |||||||||||||
| 44 | has 'pod_coverage' => ( | ||||||||||||
| 45 | is => 'ro', | ||||||||||||
| 46 | isa => 'Bool', | ||||||||||||
| 47 | lazy => 1, | ||||||||||||
| 48 | 0 | ▶ | default => sub { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 49 | defined $_[0] -> payload -> {pod_coverage} ? | ||||||||||||
| 50 | 0 | ▶ | $_[0] -> payload -> {pod_coverage} : 1 | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 51 | } | ||||||||||||
| 52 | 1 | ); | |||||||||||
| 53 | |||||||||||||
| 54 | has 'git_push' => ( | ||||||||||||
| 55 | is => 'ro', | ||||||||||||
| 56 | isa => 'Bool', | ||||||||||||
| 57 | lazy => 1, | ||||||||||||
| 58 | 0 | ▶ | default => sub { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 59 | defined $_[0] -> payload -> {git_push} ? | ||||||||||||
| 60 | 0 | ▶ | $_[0] -> payload -> {git_push} : 1 | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 61 | } | ||||||||||||
| 62 | 1 | ); | |||||||||||
| 63 | |||||||||||||
| 64 | has 'github' => ( | ||||||||||||
| 65 | is => 'ro', | ||||||||||||
| 66 | isa => 'Bool', | ||||||||||||
| 67 | lazy => 1, | ||||||||||||
| 68 | 0 | ▶ | default => sub { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 69 | defined $_[0] -> payload -> {github} ? | ||||||||||||
| 70 | 0 | ▶ | $_[0] -> payload -> {github} : 1 | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 71 | } | ||||||||||||
| 72 | 1 | ); | |||||||||||
| 73 | |||||||||||||
| 74 | =head1 NAME | ||||||||||||
| 75 | |||||||||||||
| 76 | Dist::Zilla::PluginBundle::Author::ALEXBIO - Plugin bundle used by ALEXBIO | ||||||||||||
| 77 | |||||||||||||
| 78 | =head1 VERSION | ||||||||||||
| 79 | |||||||||||||
| 80 | version 2.07 | ||||||||||||
| 81 | |||||||||||||
| 82 | =head1 SYNOPSIS | ||||||||||||
| 83 | |||||||||||||
| 84 | In your dist.ini: | ||||||||||||
| 85 | |||||||||||||
| 86 | [@Author::ALEXBIO] | ||||||||||||
| 87 | |||||||||||||
| 88 | =head1 DESCRIPTION | ||||||||||||
| 89 | |||||||||||||
| 90 | B<Dist::Zilla::PluginBundle::Author::ALEXBIO> is the L<Dist::Zilla> plugin | ||||||||||||
| 91 | bundle used by ALEXBIO. | ||||||||||||
| 92 | |||||||||||||
| 93 | It is equivalent to the following: | ||||||||||||
| 94 | |||||||||||||
| 95 | [@Basic] | ||||||||||||
| 96 | [@GitHub] | ||||||||||||
| 97 | |||||||||||||
| 98 | [MetaConfig] | ||||||||||||
| 99 | [MetaJSON] | ||||||||||||
| 100 | |||||||||||||
| 101 | [AutoPrereqs] | ||||||||||||
| 102 | |||||||||||||
| 103 | [Git::NextVersion] | ||||||||||||
| 104 | |||||||||||||
| 105 | [PodVersion] | ||||||||||||
| 106 | [PkgVersion] | ||||||||||||
| 107 | |||||||||||||
| 108 | [Test::Compile] | ||||||||||||
| 109 | [Test::CheckManifest] | ||||||||||||
| 110 | [PodSyntaxTests] | ||||||||||||
| 111 | [PodCoverageTests] | ||||||||||||
| 112 | |||||||||||||
| 113 | [NextRelease] | ||||||||||||
| 114 | |||||||||||||
| 115 | [Git::Commit] | ||||||||||||
| 116 | |||||||||||||
| 117 | [Git::Tag] | ||||||||||||
| 118 | tag_message = %N %v | ||||||||||||
| 119 | |||||||||||||
| 120 | [Git::Push] | ||||||||||||
| 121 | |||||||||||||
| 122 | [InstallRelease] | ||||||||||||
| 123 | install_command = cpanm . | ||||||||||||
| 124 | |||||||||||||
| 125 | [Clean] | ||||||||||||
| 126 | |||||||||||||
| 127 | =cut | ||||||||||||
| 128 | |||||||||||||
| 129 | 0 | ▶ | sub configure { | ||||||||||
|
Subroutine
configure: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||
| 130 | 0 | my $self = shift; | |||||||||||
| 131 | |||||||||||||
| 132 | # @Basic plugins but MakeMaker and UploadToCPAN | ||||||||||||
| 133 | 0 | $self -> add_plugins( | |||||||||||
| 134 | 'GatherDir', | ||||||||||||
| 135 | 'PruneCruft', | ||||||||||||
| 136 | 'ManifestSkip', | ||||||||||||
| 137 | 'MetaYAML', | ||||||||||||
| 138 | 'License', | ||||||||||||
| 139 | 'Readme', | ||||||||||||
| 140 | 'ExtraTests', | ||||||||||||
| 141 | 'ExecDir', | ||||||||||||
| 142 | 'ShareDir', | ||||||||||||
| 143 | 'Manifest', | ||||||||||||
| 144 | 'TestRelease', | ||||||||||||
| 145 | 'ConfirmRelease', | ||||||||||||
| 146 | ); | ||||||||||||
| 147 | |||||||||||||
| 148 | # use MakeMaker if requested | ||||||||||||
| 149 | 0 | ▶ | if ($self -> makemaker) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 150 | 0 | $self -> add_plugins( | |||||||||||
| 151 | 'MakeMaker' | ||||||||||||
| 152 | ); | ||||||||||||
| 153 | } | ||||||||||||
| 154 | |||||||||||||
| 155 | # github bundle | ||||||||||||
| 156 | 0 | ▶ | if ($self -> github) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 157 | 0 | $self -> add_bundle( | |||||||||||
| 158 | 'GitHub' => { | ||||||||||||
| 159 | metacpan => 1, | ||||||||||||
| 160 | repo => $self -> repo | ||||||||||||
| 161 | } | ||||||||||||
| 162 | ); | ||||||||||||
| 163 | } | ||||||||||||
| 164 | |||||||||||||
| 165 | # bump version | ||||||||||||
| 166 | $self -> add_plugins( | ||||||||||||
| 167 | 0 | ['Git::NextVersion' => { first_version => 0.01 }], | |||||||||||
| 168 | ); | ||||||||||||
| 169 | |||||||||||||
| 170 | # core plugins | ||||||||||||
| 171 | 0 | $self -> add_plugins( | |||||||||||
| 172 | 'MetaConfig', | ||||||||||||
| 173 | 'MetaJSON', | ||||||||||||
| 174 | 'AutoPrereqs', | ||||||||||||
| 175 | 'PodVersion', | ||||||||||||
| 176 | 'PkgVersion' | ||||||||||||
| 177 | ); | ||||||||||||
| 178 | |||||||||||||
| 179 | 0 | $self -> add_plugins('NextRelease'); | |||||||||||
| 180 | |||||||||||||
| 181 | # test plugins | ||||||||||||
| 182 | 0 | $self -> add_plugins( | |||||||||||
| 183 | 'Test::Compile', | ||||||||||||
| 184 | 'Test::CheckManifest', | ||||||||||||
| 185 | 'PodSyntaxTests' | ||||||||||||
| 186 | ); | ||||||||||||
| 187 | |||||||||||||
| 188 | 0 | ▶ | if ($self -> pod_coverage) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 189 | 0 | $self -> add_plugins( | |||||||||||
| 190 | 'PodCoverageTests' | ||||||||||||
| 191 | ); | ||||||||||||
| 192 | } | ||||||||||||
| 193 | |||||||||||||
| 194 | # release plugins | ||||||||||||
| 195 | 0 | ▶ | if ($self -> fake_release) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 196 | 0 | $self -> add_plugins('FakeRelease'); | |||||||||||
| 197 | } else { | ||||||||||||
| 198 | 0 | $self -> add_plugins( | |||||||||||
| 199 | 'Git::Commit', | ||||||||||||
| 200 | ['Git::Tag' => { tag_message => '%N %v' }] | ||||||||||||
| 201 | ); | ||||||||||||
| 202 | |||||||||||||
| 203 | 0 | ▶ | $self -> add_plugins('Git::Push') if $self -> git_push; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 204 | |||||||||||||
| 205 | $self -> add_plugins(['UploadToCPAN' => { | ||||||||||||
| 206 | 0 | ▶ | pause_cfg_file => $ENV{'ZILLA_PAUSE_CFG'} || '' | ||||||||||
|
Condition0%0/2
$ENV{'ZILLA_PAUSE_CFG'} || ''
MC/DC0%0/1
$ENV{'ZILLA_PAUSE_CFG'} || ''
$ENV{'ZILLA_PAUSE_CFG'}
Truth table0%0/2
A
A= $ENV{'ZILLA_PAUSE_CFG'}
| |||||||||||||
| 207 | }]); | ||||||||||||
| 208 | } | ||||||||||||
| 209 | |||||||||||||
| 210 | # after release | ||||||||||||
| 211 | 0 | $self -> add_plugins( | |||||||||||
| 212 | ['InstallRelease' => { install_command => 'cpanm .' }], | ||||||||||||
| 213 | 'Clean' | ||||||||||||
| 214 | ); | ||||||||||||
| 215 | } | ||||||||||||
| 216 | |||||||||||||
| 217 | =head1 ATTRIBUTES | ||||||||||||
| 218 | |||||||||||||
| 219 | =over | ||||||||||||
| 220 | |||||||||||||
| 221 | =item C<makemaker> | ||||||||||||
| 222 | |||||||||||||
| 223 | If set to '1' (default), the C<MakeMaker> plugin is used. | ||||||||||||
| 224 | |||||||||||||
| 225 | =item C<fake_relase> | ||||||||||||
| 226 | |||||||||||||
| 227 | If set to '1', the release will be faked using the C<FakeRelease> plugin. | ||||||||||||
| 228 | |||||||||||||
| 229 | =item C<pod_coverage> | ||||||||||||
| 230 | |||||||||||||
| 231 | If set to '1' (default), the C<PodCoverageTest> plugin is used. | ||||||||||||
| 232 | |||||||||||||
| 233 | =item C<github> | ||||||||||||
| 234 | |||||||||||||
| 235 | If set to '1' (default), the C<GitHub> bundle is used. | ||||||||||||
| 236 | |||||||||||||
| 237 | =item C<git_push> | ||||||||||||
| 238 | |||||||||||||
| 239 | If set to '1' (default), the C<Git::Push> plugin is used. | ||||||||||||
| 240 | |||||||||||||
| 241 | =back | ||||||||||||
| 242 | |||||||||||||
| 243 | =head1 AUTHOR | ||||||||||||
| 244 | |||||||||||||
| 245 | Alessandro Ghedini <alexbio@cpan.org> | ||||||||||||
| 246 | |||||||||||||
| 247 | =head1 LICENSE AND COPYRIGHT | ||||||||||||
| 248 | |||||||||||||
| 249 | Copyright 2011 Alessandro Ghedini. | ||||||||||||
| 250 | |||||||||||||
| 251 | This program is free software; you can redistribute it and/or modify it | ||||||||||||
| 252 | under the terms of either: the GNU General Public License as published | ||||||||||||
| 253 | by the Free Software Foundation; or the Artistic License. | ||||||||||||
| 254 | |||||||||||||
| 255 | See http://dev.perl.org/licenses/ for more information. | ||||||||||||
| 256 | |||||||||||||
| 257 | =cut | ||||||||||||
| 258 | |||||||||||||
| 259 | 1 | ▶ | no Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 260 | |||||||||||||
| 261 | 1 | __PACKAGE__ -> meta -> make_immutable; | |||||||||||
| 262 | |||||||||||||
| 263 | 1 | 1; # End of Dist::Zilla::PluginBundle::Author::ALEXBIO | |||||||||||