File Coverage

lib/Dist/Zilla/PluginBundle/Author/CSJEWELL.pm
Criterion Covered Total %
statement 11 16 68.7
branch 0 12 0.0
condition n/a
subroutine 4 6 66.6
pod 0 2 0.0
total 15 36 41.6


line stmt bran cond sub pod time code
1             package Dist::Zilla::PluginBundle::Author::CSJEWELL;
2              
3 1     1   1969 use v5.10;
  1         9  
4 1     1   7 use Moose;
  1         3  
  1         13  
5 1     1   8998 use Types::Standard qw(Bool ArrayRef Str);
  1         81027  
  1         33  
6             with 'Dist::Zilla::Role::PluginBundle::Easy';
7             with 'Dist::Zilla::Role::PluginBundle::Config::Slicer';
8              
9             our $VERSION = '0.994';
10              
11             has fake_release => (
12             is => 'ro',
13             isa => 'Bool',
14             lazy => 1,
15             default => sub {
16             $ENV{'DZIL_NO_RELEASE'} ? $ENV{'DZIL_NO_RELEASE'}
17             : exists $_[0]->payload->{'fake_release'} ? $_[0]->payload->{'fake_release'}
18             : 1;
19             },
20             );
21              
22             has perltidyrc => (
23             is => 'ro',
24             isa => 'Str',
25             lazy => 1,
26             default => sub {
27             exists $_[0]->payload->{'perltidyrc'} ? $_[0]->payload->{'perltidyrc'} : 'xt/settings/perltidy.txt';
28             },
29             );
30              
31             has darkpan => (
32             is => 'ro',
33             isa => 'Bool',
34             lazy => 1,
35             default => sub {
36             exists $_[0]->payload->{'darkpan'} ? $_[0]->payload->{'darkpan'} : 0;
37             },
38             );
39              
40             has twitter => (
41             is => 'ro',
42             isa => 'Bool',
43             lazy => 1,
44             default => sub {
45             $_[0]->fake_release ? 0
46             : exists $_[0]->payload->{'twitter'} ? $_[0]->payload->{'twitter'}
47             : 0;
48             },
49             );
50              
51             has exclusions => (
52             is => 'ro',
53             isa => 'ArrayRef[Str]',
54             lazy => 1,
55             default => sub { exists $_[0]->payload->{'exclusions'} ? $_[0]->payload->{'exclusions'} : ['t/000-']; },
56             );
57              
58 0     0 0   sub mvp_multivalue_args {qw(exclusions)}
59              
60             sub configure {
61 0     0 0   my ($self) = @_;
62              
63 0 0         my @plugins = (
    0          
    0          
    0          
    0          
    0          
64             $self->fake_release ? ['CSJEWELL::FakeReleaseAnnounce'] : (),
65             ['CSJEWELL::ReleaseStatusFromMetaJSON'],
66             ['CSJEWELL::BeforeBuild'],
67             ['GatherDir'],
68             ['ManifestSkip'],
69             ['CSJEWELL::VersionGetter'],
70             ['CSJEWELL::ModuleBuild'],
71             [
72             'PerlTidy::WithExclusions' => {
73             perltidyrc => $self->perltidyrc,
74             exclusions => $self->exclusions
75             }
76             ],
77              
78             ['ConfirmRelease'],
79             ['RunExtraTests'],
80              
81             $self->fake_release ? (['FakeRelease'])
82             : $self->darkpan ? (['CSJEWELL::UploadToDarkPAN'])
83             : (['UploadToCPAN']),
84              
85             ['Git::Check'],
86             ['Git::Commit'],
87             $self->fake_release ? () : ['Git::Tag'],
88             $self->fake_release
89             ? ()
90             : [ 'Git::Push',
91             { push_to => 'origin github',
92             }
93             ],
94              
95             $self->twitter
96             ? [ 'Twitter',
97             { tweet => 'Uploaded {{$DIST}} {{$VERSION}} to #CPAN - find it on your local mirror. {{$URL}} #perl',
98             url_shortener => '',
99             } ]
100             : (),
101             );
102              
103 0           $self->add_plugins(@plugins);
104              
105 0           return $self;
106             } ## end sub configure
107              
108             __PACKAGE__->meta->make_immutable;
109 1     1   1905 no Moose;
  1         4  
  1         16  
110             1;
111              
112             __END__
113              
114             =pod
115              
116             =head1 NAME
117              
118             Dist::Zilla::PluginBundle::Author::CSJEWELL - CSJEWELL's basic plugins to maintain and release CPAN dists
119              
120             =head1 VERSION
121              
122             This document describes Dist::Zilla::PluginBundle::Author::CSJEWELL version 0.994.
123              
124             =head1 DESCRIPTION
125              
126             This is meant to be a usable plugin bundle for those of us that want to check
127             in everything, and have what is checked in be released, other than what can
128             be generated from what IS checked in at 'Build dist' or 'dzil build' time,
129             and that both of those generate an identical tarball.
130              
131             The goal is that no plugin that creates or modifies a .pm, .pod, or .t file
132             'on the fly' is in here.
133              
134             It includes the following plugins with their default configuration:
135              
136             =over 4
137              
138             =item *
139              
140             L<Dist::Zilla::Plugin::CSJEWELL::BeforeBuild|Dist::Zilla::Plugin::CSJEWELL::BeforeBuild>
141              
142             =item *
143              
144             L<Dist::Zilla::Plugin::GatherDir|Dist::Zilla::Plugin::GatherDir>
145              
146             =item *
147              
148             L<Dist::Zilla::Plugin::ManifestSkip|Dist::Zilla::Plugin::ManifestSkip>
149              
150             =item *
151              
152             L<Dist::Zilla::Plugin::CSJEWELL::VersionGetter|Dist::Zilla::Plugin::CSJEWELL::VersionGetter>
153              
154             =item *
155              
156             L<Dist::Zilla::Plugin::TestRelease|Dist::Zilla::Plugin::TestRelease>
157              
158             =item *
159              
160             L<Dist::Zilla::Plugin::ConfirmRelease|Dist::Zilla::Plugin::ConfirmRelease>
161              
162             =item *
163              
164             L<Dist::Zilla::Plugin::UploadToCPAN|Dist::Zilla::Plugin::UploadToDarkPAN> *
165              
166             =item *
167              
168             L<Dist::Zilla::Plugin::UploadToCPAN|Dist::Zilla::Plugin::UploadToCPAN> *
169              
170             =item *
171              
172             L<Dist::Zilla::Plugin::FakeRelease|Dist::Zilla::Plugin::FakeRelease> *
173              
174             =back
175              
176             * Note that the choice of which the last three is given by two options to the
177             plugin bundle - if "fake_release" does not exist, or if it exists and is 1,
178             then FakeRelease is used, and if "darkpan" exists and is 1, then
179             CSJEWELL::UploadToDarkPAN is used. Otherwise, UploadToCPAN is used.
180              
181             =for Pod::Coverage darkpan configure
182              
183             =for stopword Makefile yml README
184              
185             =head1 AUTHOR
186              
187             Curtis Jewell <CSJewell@cpan.org>
188              
189             =head1 SEE ALSO
190              
191             L<Dist::Zilla::BeLike::CSJEWELL|Dist::Zilla::BeLike::CSJEWELL>
192              
193             =head1 LICENSE AND COPYRIGHT
194              
195             Copyright (c) 2010, 2021 Curtis Jewell C<< CSJewell@cpan.org >>.
196              
197             This module is free software; you can redistribute it and/or
198             modify it under the same terms as Perl itself, either version
199             5.8.1 or any later version. See L<perlartistic|perlartistic>
200             and L<perlgpl|perlgpl>.
201              
202             The full text of the license can be found in the
203             LICENSE file included with this module.
204              
205             =head1 DISCLAIMER OF WARRANTY
206              
207             BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
208             FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
209             OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
210             PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
211             EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
212             WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
213             ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
214             YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
215             NECESSARY SERVICING, REPAIR, OR CORRECTION.
216              
217             IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
218             WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
219             REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
220             LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
221             OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
222             THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
223             RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
224             FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
225             SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
226             SUCH DAMAGES.
227              
228             =cut
229