| 1 | package Dist::Zilla::PluginBundle::Author::TEAM; | ||||||||||||||||||||||||
| 2 | # ABSTRACT: Defines common dist.ini config for distributions by TEAM | ||||||||||||||||||||||||
| 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:TEAM'; # AUTHORITY | |||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||
| 10 | =head1 NAME | ||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||
| 12 | Dist::Zilla::PluginBundle::Author::TEAM - yet another plugin bundle for Dist::Zilla | ||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||
| 14 | =head1 DESCRIPTION | ||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||
| 16 | See L<https://metacpan.org/author/TEAM> 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:TEAM'; | ||||||||||||||||||||||
|
Condition0%0/5
($self->payload->{"Authority.authority"} // $self->payload->{"authority"}) // "cpan:TEAM"
$self->payload->{"Authority.authority"} // $self->payload->{"authority"}
MC/DC0%0/2
($self->payload->{"Authority.authority"} // $self->payload->{"authority"}) // "cpan:TEAM"
$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 installer => ( | ||||||||||||||||||||||||
| 45 | is => 'ro', | ||||||||||||||||||||||||
| 46 | isa => 'Str', | ||||||||||||||||||||||||
| 47 | lazy => 1, | ||||||||||||||||||||||||
| 48 | 0 | ▶ | default => sub { shift->payload->{installer} // 'MakeMaker' }, | ||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
+(shift())->payload->{"installer"} // "MakeMaker"
MC/DC0%0/1
+(shift())->payload->{"installer"} // "MakeMaker"
+(shift())->payload->{"installer"}
Truth table0%0/2
A
A= +(shift())->payload->{"installer"}
| |||||||||||||||||||||||||
| 49 | 1 | ); | |||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||
| 51 | 0 | ▶ | sub configure { | ||||||||||||||||||||||
|
Subroutine
configure: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||
| 52 | 0 | my $self = shift; | |||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||
| 54 | 0 | my @copy_from_build = qw(LICENSE Makefile.PL); | |||||||||||||||||||||||
| 55 | 0 | my @gather_exclude = (@copy_from_build, qw(README.md)); | |||||||||||||||||||||||
| 56 | 0 | my @no_index = qw(eg share shares t xt); | |||||||||||||||||||||||
| 57 | 0 | my @allow_dirty = (@copy_from_build, qw(Changes LICENSE README.md)); | |||||||||||||||||||||||
| 58 | 0 | my @git_remotes = qw(github origin); | |||||||||||||||||||||||
| 59 | 0 | my @check_files = qw(:InstallModules :ExecFiles :TestFiles :ExtraTestFiles); | |||||||||||||||||||||||
| 60 | 0 | my $perl_version_target = $self->max_target_perl; | |||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||
| 62 | 0 | ▶ | my @plugins = ( | ||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||
| 63 | ['Git::GatherDir' => { | ||||||||||||||||||||||||
| 64 | exclude_filename => [ @gather_exclude ] | ||||||||||||||||||||||||
| 65 | } ], | ||||||||||||||||||||||||
| 66 | ['PruneCruft'], | ||||||||||||||||||||||||
| 67 | ['CopyFilesFromBuild' => {copy => [@copy_from_build]}], | ||||||||||||||||||||||||
| 68 | ['ExecDir'], | ||||||||||||||||||||||||
| 69 | ['ShareDir'], | ||||||||||||||||||||||||
| 70 | -f 'cpanfile' ? ['Prereqs::FromCPANfile'] : (), | ||||||||||||||||||||||||
| 71 | ['Prereqs::AuthorDeps'], | ||||||||||||||||||||||||
| 72 | ['CheckPrereqsIndexed'], | ||||||||||||||||||||||||
| 73 | ['CheckExtraTests'], | ||||||||||||||||||||||||
| 74 | ['InsertExample'], | ||||||||||||||||||||||||
| 75 | ['PodInherit'], | ||||||||||||||||||||||||
| 76 | ['PodSyntaxTests'], | ||||||||||||||||||||||||
| 77 | ['MojibakeTests'], | ||||||||||||||||||||||||
| 78 | ['Test::CheckDeps'], | ||||||||||||||||||||||||
| 79 | ['Test::Compile'], | ||||||||||||||||||||||||
| 80 | ['Test::Version'], | ||||||||||||||||||||||||
| 81 | ['SpellingCommonMistakesTests'], | ||||||||||||||||||||||||
| 82 | ['MetaTests'], | ||||||||||||||||||||||||
| 83 | ['Test::CPAN::Changes'], | ||||||||||||||||||||||||
| 84 | ['Test::MinimumVersion' => {max_target_perl => $perl_version_target}], | ||||||||||||||||||||||||
| 85 | ['Test::EOL' => {finder => [@check_files]}], | ||||||||||||||||||||||||
| 86 | ['Test::NoTabs' => {finder => [@check_files]}], | ||||||||||||||||||||||||
| 87 | ['Test::Portability'], | ||||||||||||||||||||||||
| 88 | ['Test::ReportPrereqs'], | ||||||||||||||||||||||||
| 89 | ['Authority' => {authority => $self->authority, do_munging => 1, locate_comment => 1}], | ||||||||||||||||||||||||
| 90 | ['MetaJSON'], | ||||||||||||||||||||||||
| 91 | ['MetaYAML'], | ||||||||||||||||||||||||
| 92 | ['MetaNoIndex' => {directory => [@no_index]}], | ||||||||||||||||||||||||
| 93 | ['MetaProvides::Package'], | ||||||||||||||||||||||||
| 94 | ['Keywords'], | ||||||||||||||||||||||||
| 95 | ['VersionFromModule'], | ||||||||||||||||||||||||
| 96 | ['ReversionOnRelease'], | ||||||||||||||||||||||||
| 97 | ['OurPkgVersion'], | ||||||||||||||||||||||||
| 98 | ['Git::Contributors' => {order_by => 'commits'}], | ||||||||||||||||||||||||
| 99 | ['GithubMeta' => {remote => [@git_remotes], issues => 1}], | ||||||||||||||||||||||||
| 100 | ['OverridePkgVersion'], | ||||||||||||||||||||||||
| 101 | ['License'], | ||||||||||||||||||||||||
| 102 | ['ReadmeAnyFromPod' => 'RepoReadme' => {filename => 'README.md', location => 'root', type => 'markdown', phase => 'release'}], | ||||||||||||||||||||||||
| 103 | ['ReadmeAnyFromPod' => 'DistReadme' => {filename => 'README', location => 'build', type => 'text'}], | ||||||||||||||||||||||||
| 104 | ['Manifest'], | ||||||||||||||||||||||||
| 105 | ['ManifestSkip'], | ||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||
| 107 | $self->installer, # e.g. MakeMaker | ||||||||||||||||||||||||
| 108 | ['NextRelease'], | ||||||||||||||||||||||||
| 109 | ['CheckChangesHasContent'], | ||||||||||||||||||||||||
| 110 | ['Git::Check' => {allow_dirty => [@allow_dirty], untracked_files => 'ignore'}], | ||||||||||||||||||||||||
| 111 | ['TestRelease'], | ||||||||||||||||||||||||
| 112 | ['UploadToCPAN'], | ||||||||||||||||||||||||
| 113 | ['ConfirmRelease'], | ||||||||||||||||||||||||
| 114 | ['Git::Commit' => {allow_dirty => [@allow_dirty], commit_msg => 'Release %N %v%t%n%n%c'}], | ||||||||||||||||||||||||
| 115 | ['Git::CommitBuild' => {branch => '', release_branch => 'dist', release_message => 'Version %v%t'}], | ||||||||||||||||||||||||
| 116 | ['Git::Tag' => {tag_message => 'Tag v%v for CPAN release'}], | ||||||||||||||||||||||||
| 117 | ['ArchiveRelease' => { directory => '/home/tom/dev/CPAN-Archive' } ], | ||||||||||||||||||||||||
| 118 | ['Git::Push' => {push_to => 'github master +master:refs/heads/release +dist', remotes_must_exist => 0}], | ||||||||||||||||||||||||
| 119 | ); | ||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||
| 121 | 0 | $self->add_plugins(@plugins); | |||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||
| 124 | 1 | with 'Dist::Zilla::Role::PluginBundle::Easy'; | |||||||||||||||||||||||
| 125 | 1 | with 'Dist::Zilla::Role::PluginBundle::PluginRemover'; | |||||||||||||||||||||||
| 126 | 1 | with 'Dist::Zilla::Role::PluginBundle::Config::Slicer'; | |||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||
| 128 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||
| 130 | 1 | 1; | |||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||
| 132 | =head1 AUTHOR | ||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||
| 134 | Tom Molesworth C<< <TEAM@cpan.org> >>, but structure mostly taken from other plugin bundles such as: | ||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||
| 136 | =over 4 | ||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||
| 138 | =item * L<Dist::Zilla::PluginBundle::Author::ETHER> | ||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||
| 140 | =item * L<Dist::Zilla::Plugin::Author::Plicease> | ||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||
| 142 | =back | ||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||
| 144 | =head1 LICENSE | ||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||
| 146 | Copyright Tom Molesworth 2019. Licensed under the same terms as Perl itself. | ||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||