« lib/Dist/Zilla/Plugin/PerlTidy/WithExclusions.pm
↑ Summary
lib/Dist/Zilla/Plugin/CSJEWELL/ReleaseStatusFromMetaJSON.pm »
| 1 | package Dist::Zilla::PluginBundle::Author::CSJEWELL; | ||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use v5.10; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use Moose; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use Types::Standard qw(Bool ArrayRef Str); | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 6 | 1 | with 'Dist::Zilla::Role::PluginBundle::Easy'; | |||||||||||||||||||||||||||||
| 7 | 1 | with 'Dist::Zilla::Role::PluginBundle::Config::Slicer'; | |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||
| 9 | 1 | our $VERSION = '0.994'; | |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||
| 11 | has fake_release => ( | ||||||||||||||||||||||||||||||
| 12 | is => 'ro', | ||||||||||||||||||||||||||||||
| 13 | isa => 'Bool', | ||||||||||||||||||||||||||||||
| 14 | lazy => 1, | ||||||||||||||||||||||||||||||
| 15 | 0 | ▶ | default => sub { | ||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||
| 16 | $ENV{'DZIL_NO_RELEASE'} ? $ENV{'DZIL_NO_RELEASE'} | ||||||||||||||||||||||||||||||
| 17 | 0 | ▶ | : exists $_[0]->payload->{'fake_release'} ? $_[0]->payload->{'fake_release'} | ||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||
| 18 | : 1; | ||||||||||||||||||||||||||||||
| 19 | }, | ||||||||||||||||||||||||||||||
| 20 | 1 | ); | |||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||
| 22 | has perltidyrc => ( | ||||||||||||||||||||||||||||||
| 23 | is => 'ro', | ||||||||||||||||||||||||||||||
| 24 | isa => 'Str', | ||||||||||||||||||||||||||||||
| 25 | lazy => 1, | ||||||||||||||||||||||||||||||
| 26 | 0 | ▶ | default => sub { | ||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||
| 27 | 0 | ▶ | exists $_[0]->payload->{'perltidyrc'} ? $_[0]->payload->{'perltidyrc'} : 'xt/settings/perltidy.txt'; | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 28 | }, | ||||||||||||||||||||||||||||||
| 29 | 1 | ); | |||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||
| 31 | has darkpan => ( | ||||||||||||||||||||||||||||||
| 32 | is => 'ro', | ||||||||||||||||||||||||||||||
| 33 | isa => 'Bool', | ||||||||||||||||||||||||||||||
| 34 | lazy => 1, | ||||||||||||||||||||||||||||||
| 35 | 0 | ▶ | default => sub { | ||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||||
| 36 | 0 | ▶ | exists $_[0]->payload->{'darkpan'} ? $_[0]->payload->{'darkpan'} : 0; | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 37 | }, | ||||||||||||||||||||||||||||||
| 38 | 1 | ); | |||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||
| 40 | has twitter => ( | ||||||||||||||||||||||||||||||
| 41 | is => 'ro', | ||||||||||||||||||||||||||||||
| 42 | isa => 'Bool', | ||||||||||||||||||||||||||||||
| 43 | lazy => 1, | ||||||||||||||||||||||||||||||
| 44 | 0 | ▶ | default => sub { | ||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||||
| 45 | $_[0]->fake_release ? 0 | ||||||||||||||||||||||||||||||
| 46 | 0 | ▶ | : exists $_[0]->payload->{'twitter'} ? $_[0]->payload->{'twitter'} | ||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||
| 47 | : 0; | ||||||||||||||||||||||||||||||
| 48 | }, | ||||||||||||||||||||||||||||||
| 49 | 1 | ); | |||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||
| 51 | has exclusions => ( | ||||||||||||||||||||||||||||||
| 52 | is => 'ro', | ||||||||||||||||||||||||||||||
| 53 | isa => 'ArrayRef[Str]', | ||||||||||||||||||||||||||||||
| 54 | lazy => 1, | ||||||||||||||||||||||||||||||
| 55 | 0 | ▶ | default => sub { exists $_[0]->payload->{'exclusions'} ? $_[0]->payload->{'exclusions'} : ['t/000-']; }, | ||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 56 | 1 | ); | |||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||
| 58 | 0 | ▶ | sub mvp_multivalue_args {qw(exclusions)} | ||||||||||||||||||||||||||||
|
Subroutine
mvp_multivalue_args: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||
| 60 | 0 | ▶ | sub configure { | ||||||||||||||||||||||||||||
|
Subroutine
configure: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||||
| 61 | 0 | my ($self) = @_; | |||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||
| 63 | 0 | ▶ | my @plugins = ( | ||||||||||||||||||||||||||||
|
Branch: 6 branches
| |||||||||||||||||||||||||||||||
| 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 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||||||||
| 109 | 1 | ▶ | no Moose; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 110 | 1 | 1; | |||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||
| 112 | __END__ | ||||||||||||||||||||||||||||||