| 1 | package Dist::Zilla::PluginBundle::Author::DERIV; | ||||||||||||||||||||||||
| 2 | # ABSTRACT: Defines common dist.ini config for distributions by DERIV | ||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||
| 7 | 1 | our $VERSION = '0.005'; | |||||||||||||||||||||||
| 8 | 1 | our $AUTHORITY = 'cpan:DERIV'; # AUTHORITY | |||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||
| 10 | =head1 NAME | ||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||
| 12 | Dist::Zilla::PluginBundle::Author::DERIV - yet another plugin bundle for Dist::Zilla | ||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||
| 14 | =head1 DESCRIPTION | ||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||
| 16 | See L<https://metacpan.org/author/DERIV> for modules which may possibly use this. | ||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||
| 18 | =cut | ||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||
| 20 | 1 | ▶ | use Dist::Zilla::Util; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 21 | 1 | ▶ | use Moose; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 22 | 1 | ▶ | use Perl::Version; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||
| 24 | has max_target_perl => ( | ||||||||||||||||||||||||
| 25 | is => 'ro', | ||||||||||||||||||||||||
| 26 | isa => 'Str', | ||||||||||||||||||||||||
| 27 | lazy => 1, | ||||||||||||||||||||||||
| 28 | 0 | ▶ | default => sub { | ||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||
| 29 | 0 | my $self = shift; | |||||||||||||||||||||||
| 30 | 0 | ▶ | $self->payload->{'Test::MinimumVersion.max_target_perl'} // $self->payload->{max_target_perl} // '5.14.0'; | ||||||||||||||||||||||
|
Condition0%0/5
($self->payload->{"Test::MinimumVersion.max_target_perl"} // $self->payload->{"max_target_perl"}) // "5.14.0"
$self->payload->{"Test::MinimumVersion.max_target_perl"} // $self->payload->{"max_target_perl"}
MC/DC0%0/2
($self->payload->{"Test::MinimumVersion.max_target_perl"} // $self->payload->{"max_target_perl"}) // "5.14.0"
$self->payload->{"Test::MinimumVersion.max_target_perl"}
$self->payload->{"max_target_perl"}
Truth table0%0/3
A // B
A= $self->payload->{"Test::MinimumVersion.max_target_perl"}B= $self->payload->{"max_target_perl"}
| |||||||||||||||||||||||||
| 31 | }, | ||||||||||||||||||||||||
| 32 | 1 | ); | |||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||
| 34 | has authority => ( | ||||||||||||||||||||||||
| 35 | is => 'ro', | ||||||||||||||||||||||||
| 36 | isa => 'Str', | ||||||||||||||||||||||||
| 37 | lazy => 1, | ||||||||||||||||||||||||
| 38 | 0 | ▶ | default => sub { | ||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||
| 39 | 0 | my $self = shift; | |||||||||||||||||||||||
| 40 | 0 | ▶ | $self->payload->{'Authority.authority'} // $self->payload->{authority} // 'cpan:DERIV'; | ||||||||||||||||||||||
|
Condition0%0/5
($self->payload->{"Authority.authority"} // $self->payload->{"authority"}) // "cpan:DERIV"
$self->payload->{"Authority.authority"} // $self->payload->{"authority"}
MC/DC0%0/2
($self->payload->{"Authority.authority"} // $self->payload->{"authority"}) // "cpan:DERIV"
$self->payload->{"Authority.authority"}
$self->payload->{"authority"}
Truth table0%0/3
A // B
A= $self->payload->{"Authority.authority"}B= $self->payload->{"authority"}
| |||||||||||||||||||||||||
| 41 | }, | ||||||||||||||||||||||||
| 42 | 1 | ); | |||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||
| 44 | has eumm_version => ( | ||||||||||||||||||||||||
| 45 | is => 'ro', | ||||||||||||||||||||||||
| 46 | isa => 'Str', | ||||||||||||||||||||||||
| 47 | lazy => 1, | ||||||||||||||||||||||||
| 48 | 0 | ▶ | default => sub { | ||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||
| 49 | 0 | my $self = shift; | |||||||||||||||||||||||
| 50 | 0 | ▶ | $self->payload->{'MakeMaker.eumm_version'} // $self->payload->{eumm_version} // '7.64'; | ||||||||||||||||||||||
|
Condition0%0/5
($self->payload->{"MakeMaker.eumm_version"} // $self->payload->{"eumm_version"}) // "7.64"
$self->payload->{"MakeMaker.eumm_version"} // $self->payload->{"eumm_version"}
MC/DC0%0/2
($self->payload->{"MakeMaker.eumm_version"} // $self->payload->{"eumm_version"}) // "7.64"
$self->payload->{"MakeMaker.eumm_version"}
$self->payload->{"eumm_version"}
Truth table0%0/3
A // B
A= $self->payload->{"MakeMaker.eumm_version"}B= $self->payload->{"eumm_version"}
| |||||||||||||||||||||||||
| 51 | }, | ||||||||||||||||||||||||
| 52 | 1 | ); | |||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||
| 54 | has allow_dirty => ( | ||||||||||||||||||||||||
| 55 | is => 'ro', | ||||||||||||||||||||||||
| 56 | lazy => 1, | ||||||||||||||||||||||||
| 57 | 0 | ▶ | default => sub {shift->payload->{allow_dirty} // [] }, | ||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
+(shift())->payload->{"allow_dirty"} // []
MC/DC0%0/1
+(shift())->payload->{"allow_dirty"} // []
+(shift())->payload->{"allow_dirty"}
Truth table0%0/2
A
A= +(shift())->payload->{"allow_dirty"}
| |||||||||||||||||||||||||
| 58 | 1 | ); | |||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||
| 60 | has exclude_filename => ( | ||||||||||||||||||||||||
| 61 | is => 'ro', | ||||||||||||||||||||||||
| 62 | lazy => 1, | ||||||||||||||||||||||||
| 63 | 0 | ▶ | default => sub {shift->payload->{exclude_filename} // [] }, | ||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
+(shift())->payload->{"exclude_filename"} // []
MC/DC0%0/1
+(shift())->payload->{"exclude_filename"} // []
+(shift())->payload->{"exclude_filename"}
Truth table0%0/2
A
A= +(shift())->payload->{"exclude_filename"}
| |||||||||||||||||||||||||
| 64 | 1 | ); | |||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||
| 67 | 0 | ▶ | sub mvp_multivalue_args{ qw(allow_dirty exclude_filename) } | ||||||||||||||||||||||
|
Subroutine
mvp_multivalue_args: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||
| 69 | 0 | ▶ | sub configure { | ||||||||||||||||||||||
|
Subroutine
configure: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||
| 70 | 0 | my $self = shift; | |||||||||||||||||||||||
| 71 | 0 | my @copy_from_build = qw(LICENSE Makefile.PL); | |||||||||||||||||||||||
| 72 | 0 | my @gather_exclude = (@copy_from_build, qw(README.md), @{$self->exclude_filename}); | |||||||||||||||||||||||
| 73 | 0 | my @no_index = qw(eg share shares t xt); | |||||||||||||||||||||||
| 74 | 0 | my @allow_dirty = (@copy_from_build, @{$self->allow_dirty}, qw(Changes LICENSE README.md)); | |||||||||||||||||||||||
| 75 | 0 | my @git_remotes = qw(github origin); | |||||||||||||||||||||||
| 76 | 0 | my @check_files = qw(:InstallModules :ExecFiles :TestFiles :ExtraTestFiles); | |||||||||||||||||||||||
| 77 | 0 | my $perl_version_target = $self->max_target_perl; | |||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||
| 79 | 0 | ▶ | my @plugins = ( | ||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||
| 80 | ['Git::GatherDir' => { | ||||||||||||||||||||||||
| 81 | exclude_filename => [ @gather_exclude ] | ||||||||||||||||||||||||
| 82 | } ], | ||||||||||||||||||||||||
| 83 | ['PruneCruft'], | ||||||||||||||||||||||||
| 84 | ['CopyFilesFromBuild' => {copy => [@copy_from_build]}], | ||||||||||||||||||||||||
| 85 | ['ExecDir'], | ||||||||||||||||||||||||
| 86 | ['ShareDir'], | ||||||||||||||||||||||||
| 87 | ['AutoPrereqs'], | ||||||||||||||||||||||||
| 88 | -f 'cpanfile' ? ['Prereqs::FromCPANfile'] : (), | ||||||||||||||||||||||||
| 89 | ['Prereqs::AuthorDeps'], | ||||||||||||||||||||||||
| 90 | ['CheckPrereqsIndexed'], | ||||||||||||||||||||||||
| 91 | ['CheckExtraTests'], | ||||||||||||||||||||||||
| 92 | ['InsertExample'], | ||||||||||||||||||||||||
| 93 | ['PodInherit'], | ||||||||||||||||||||||||
| 94 | ['PodSyntaxTests'], | ||||||||||||||||||||||||
| 95 | ['MojibakeTests'], | ||||||||||||||||||||||||
| 96 | ['Test::CheckDeps'], | ||||||||||||||||||||||||
| 97 | ['Test::Compile'], | ||||||||||||||||||||||||
| 98 | ['Test::Version'], | ||||||||||||||||||||||||
| 99 | ['SpellingCommonMistakesTests'], | ||||||||||||||||||||||||
| 100 | ['MetaTests'], | ||||||||||||||||||||||||
| 101 | ['Test::CPAN::Changes'], | ||||||||||||||||||||||||
| 102 | ['Test::MinimumVersion' => {max_target_perl => $perl_version_target}], | ||||||||||||||||||||||||
| 103 | ['Test::EOL' => {finder => [@check_files]}], | ||||||||||||||||||||||||
| 104 | ['Test::NoTabs' => {finder => [@check_files]}], | ||||||||||||||||||||||||
| 105 | ['Test::Portability'], | ||||||||||||||||||||||||
| 106 | ['Test::ReportPrereqs'], | ||||||||||||||||||||||||
| 107 | ['Authority' => {authority => $self->authority, do_munging => 1, locate_comment => 1}], | ||||||||||||||||||||||||
| 108 | ['MetaJSON'], | ||||||||||||||||||||||||
| 109 | ['MetaYAML'], | ||||||||||||||||||||||||
| 110 | ['MetaNoIndex' => {directory => [@no_index]}], | ||||||||||||||||||||||||
| 111 | ['MetaProvides::Package'], | ||||||||||||||||||||||||
| 112 | ['Keywords'], | ||||||||||||||||||||||||
| 113 | ['RewriteVersion'], | ||||||||||||||||||||||||
| 114 | ['BumpVersionAfterRelease'], | ||||||||||||||||||||||||
| 115 | ['OurPkgVersion'], | ||||||||||||||||||||||||
| 116 | ['Git::Contributors' => {order_by => 'commits'}], | ||||||||||||||||||||||||
| 117 | ['GithubMeta' => {remote => [@git_remotes], issues => 1}], | ||||||||||||||||||||||||
| 118 | ['OverridePkgVersion'], | ||||||||||||||||||||||||
| 119 | ['License'], | ||||||||||||||||||||||||
| 120 | ['ReadmeAnyFromPod' => 'RepoReadme' => {filename => 'README.md', location => 'root', type => 'markdown', phase => 'release'}], | ||||||||||||||||||||||||
| 121 | ['ReadmeAnyFromPod' => 'DistReadme' => {filename => 'README', location => 'build', type => 'text'}], | ||||||||||||||||||||||||
| 122 | ['Manifest'], | ||||||||||||||||||||||||
| 123 | ['ManifestSkip'], | ||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||
| 125 | ['MakeMaker', { eumm_version => $self->eumm_version }], | ||||||||||||||||||||||||
| 126 | ['NextRelease'], | ||||||||||||||||||||||||
| 127 | ['CheckChangesHasContent'], | ||||||||||||||||||||||||
| 128 | ['Git::Check' => {allow_dirty => [@allow_dirty], untracked_files => 'ignore'}], | ||||||||||||||||||||||||
| 129 | ['TestRelease'], | ||||||||||||||||||||||||
| 130 | ['UploadToCPAN'], | ||||||||||||||||||||||||
| 131 | ['ConfirmRelease'], | ||||||||||||||||||||||||
| 132 | ['Git::Commit' => {allow_dirty => [@allow_dirty], commit_msg => 'Release %N %v%t%n%n%c'}], | ||||||||||||||||||||||||
| 133 | ['Git::CommitBuild' => {branch => '', release_branch => 'dist', release_message => 'Version %v%t'}], | ||||||||||||||||||||||||
| 134 | ['Git::Tag' => {tag_message => 'Tag v%v for CPAN release'}], | ||||||||||||||||||||||||
| 135 | ['ArchiveRelease' => { directory => '/tmp' } ], | ||||||||||||||||||||||||
| 136 | ['Git::Push' => {push_to => 'github master +master:refs/heads/release +dist', remotes_must_exist => 0}], | ||||||||||||||||||||||||
| 137 | ); | ||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||
| 139 | 0 | $self->add_plugins(@plugins); | |||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||
| 142 | 1 | with 'Dist::Zilla::Role::PluginBundle::Easy'; | |||||||||||||||||||||||
| 143 | 1 | with 'Dist::Zilla::Role::PluginBundle::PluginRemover'; | |||||||||||||||||||||||
| 144 | 1 | with 'Dist::Zilla::Role::PluginBundle::Config::Slicer'; | |||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||
| 146 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||
| 148 | 1 | 1; | |||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||
| 150 | =head1 AUTHOR | ||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||
| 152 | Deriv Services Ltd C<< <DERIV@cpan.org> >>, but initially started as an exact copy of L<Dist::Zilla::PluginBundle::Author::TEAM> | ||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||
| 154 | Copyright Deriv Services Ltd 2020. Licensed under the same terms as Perl itself. | ||||||||||||||||||||||||