| 1 | #--------------------------------------------------------------------- | ||||||||||||
| 2 | package Dist::Zilla::PluginBundle::Author::CJM; | ||||||||||||
| 3 | # | ||||||||||||
| 4 | # Copyright 2011 Christopher J. Madsen | ||||||||||||
| 5 | # | ||||||||||||
| 6 | # Author: Christopher J. Madsen <perl@cjmweb.net> | ||||||||||||
| 7 | # Created: 19 Oct 2011 | ||||||||||||
| 8 | # | ||||||||||||
| 9 | # This program is free software; you can redistribute it and/or modify | ||||||||||||
| 10 | # it under the same terms as Perl itself. | ||||||||||||
| 11 | # | ||||||||||||
| 12 | # This program is distributed in the hope that it will be useful, | ||||||||||||
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||||||||
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the | ||||||||||||
| 15 | # GNU General Public License or the Artistic License for more details. | ||||||||||||
| 16 | # | ||||||||||||
| 17 | # ABSTRACT: Build a distribution like CJM | ||||||||||||
| 18 | #--------------------------------------------------------------------- | ||||||||||||
| 19 | |||||||||||||
| 20 | 2 | our $VERSION = '6.000'; | |||||||||||
| 21 | # This file is part of Dist-Zilla-PluginBundle-Author-CJM 6.000 (December 17, 2017) | ||||||||||||
| 22 | |||||||||||||
| 23 | 2 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 24 | 2 | with 'Dist::Zilla::Role::PluginBundle::Easy'; | |||||||||||
| 25 | |||||||||||||
| 26 | |||||||||||||
| 27 | sub configure | ||||||||||||
| 28 | 1 | ▶ | { | ||||||||||
|
Subroutine
configure: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||
| 29 | 1 | my $self = shift; | |||||||||||
| 30 | |||||||||||||
| 31 | 1 | my $arg = $self->payload; | |||||||||||
| 32 | |||||||||||||
| 33 | $self->add_plugins('VersionFromModule') | ||||||||||||
| 34 | 1 | ▶ | unless $arg->{manual_version}; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 35 | |||||||||||||
| 36 | $self->add_plugins( | ||||||||||||
| 37 | qw( | ||||||||||||
| 38 | GatherDir | ||||||||||||
| 39 | PruneCruft | ||||||||||||
| 40 | ManifestSkip | ||||||||||||
| 41 | MetaJSON | ||||||||||||
| 42 | MetaYAML | ||||||||||||
| 43 | License | ||||||||||||
| 44 | Test::PrereqsFromMeta | ||||||||||||
| 45 | PodSyntaxTests | ||||||||||||
| 46 | PodCoverageTests | ||||||||||||
| 47 | ), | ||||||||||||
| 48 | [PodLoom => { | ||||||||||||
| 49 | data => 'tools/loom.pl', | ||||||||||||
| 50 | 1 | ▶ | %{ $self->config_slice({ | ||||||||||
|
Condition50%1/2
$arg->{'builder'} || 'MakeMaker'
MC/DC0%0/1
$arg->{'builder'} || 'MakeMaker'
$arg->{'builder'}
Truth table50%1/2
A
A= $arg->{'builder'}
| |||||||||||||
| 51 | pod_finder => 'finder', | ||||||||||||
| 52 | pod_template => 'template', | ||||||||||||
| 53 | }) }, | ||||||||||||
| 54 | } ], | ||||||||||||
| 55 | # either MakeMaker or ModuleBuild: | ||||||||||||
| 56 | [ ($arg->{builder} || 'MakeMaker') => | ||||||||||||
| 57 | scalar $self->config_slice(qw( eumm_version mb_version mb_class )) | ||||||||||||
| 58 | ], | ||||||||||||
| 59 | qw( | ||||||||||||
| 60 | RunExtraTests | ||||||||||||
| 61 | MetaConfig | ||||||||||||
| 62 | MatchManifest | ||||||||||||
| 63 | ), | ||||||||||||
| 64 | [ RecommendedPrereqs => scalar $self->config_slice({ | ||||||||||||
| 65 | check_recommend => 'finder', | ||||||||||||
| 66 | check_recommend_tests => 'test_finder', | ||||||||||||
| 67 | }) ], | ||||||||||||
| 68 | [ CheckPrereqsIndexed => scalar $self->config_slice({ | ||||||||||||
| 69 | skip_index_check => 'skips' | ||||||||||||
| 70 | }) ], | ||||||||||||
| 71 | [ GitVersionCheckCJM => scalar $self->config_slice({ | ||||||||||||
| 72 | single_version => 'single_version', | ||||||||||||
| 73 | check_files => 'finder' | ||||||||||||
| 74 | }) ], | ||||||||||||
| 75 | [ TemplateCJM => { | ||||||||||||
| 76 | date_format => 'MMMM d, y', | ||||||||||||
| 77 | 1 | %{$self->config_slice( | |||||||||||
| 78 | 'changelog_re', | ||||||||||||
| 79 | { pod_finder => 'finder', | ||||||||||||
| 80 | template_date_format => 'date_format', | ||||||||||||
| 81 | template_file => 'file', | ||||||||||||
| 82 | })}, | ||||||||||||
| 83 | } ], | ||||||||||||
| 84 | [ Repository => { git_remote => 'github' } ], | ||||||||||||
| 85 | ); | ||||||||||||
| 86 | |||||||||||||
| 87 | 1 | $self->add_bundle(Git => { | |||||||||||
| 88 | allow_dirty => 'Changes', | ||||||||||||
| 89 | commit_msg => 'Updated Changes for %{MMMM d, yyyy}d%{ trial}t release of %v', | ||||||||||||
| 90 | tag_format => '%v%t', | ||||||||||||
| 91 | tag_message => 'Tagged %N %v%{ (trial release)}t', | ||||||||||||
| 92 | push_to => 'github master', | ||||||||||||
| 93 | }); | ||||||||||||
| 94 | |||||||||||||
| 95 | 1 | $self->add_plugins( | |||||||||||
| 96 | 'TestRelease', | ||||||||||||
| 97 | 'UploadToCPAN', | ||||||||||||
| 98 | [ ArchiveRelease => { directory => 'cjm_releases' } ], | ||||||||||||
| 99 | ); | ||||||||||||
| 100 | |||||||||||||
| 101 | 1 | ▶ | if (my $remove = $arg->{remove_plugin}) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 102 | 1 | my $prefix = $self->name . '/'; | |||||||||||
| 103 | 1 | my %remove = map { $prefix . $_ => 1 } @$remove; | |||||||||||
| 104 | 1 | my $plugins = $self->plugins; | |||||||||||
| 105 | 1 | @$plugins = grep { not $remove{$_->[0]} } @$plugins; | |||||||||||
| 106 | } | ||||||||||||
| 107 | } # end configure | ||||||||||||
| 108 | |||||||||||||
| 109 | 1 | ▶ | sub mvp_multivalue_args { qw(check_files check_recommend check_recommend_tests | ||||||||||
|
Subroutine
mvp_multivalue_args: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 110 | remove_plugin | ||||||||||||
| 111 | pod_finder skip_index_check template_file) } | ||||||||||||
| 112 | |||||||||||||
| 113 | 2 | ▶ | no Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 114 | 2 | __PACKAGE__->meta->make_immutable; | |||||||||||
| 115 | 2 | 1; | |||||||||||
| 116 | |||||||||||||
| 117 | __END__ | ||||||||||||