File Coverage

blib/lib/Dist/Zilla/PluginBundle/Author/TABULO.pm
Criterion Covered Total %
statement 177 192 92.1
branch 79 126 62.7
condition 43 89 48.3
subroutine 45 48 93.7
pod 0 8 0.0
total 344 463 74.3


line stmt bran cond sub pod time code
1 20     20   16622836 use 5.014; # because we use the 'non-destructive substitution' feature (s///r)
  20         237  
2 20     20   139 use strict;
  20         59  
  20         463  
3 20     20   113 use warnings;
  20         68  
  20         1384  
4             package Dist::Zilla::PluginBundle::Author::TABULO; # git description: v0.197-45-g838f7b1
5             # vim: set ts=2 sts=2 sw=2 tw=115 et :
6             # ABSTRACT: A plugin bundle for distributions built by TABULO
7             # BASED_ON: Dist::Zilla::PluginBundle::Author::ETHER
8             # KEYWORDS: author bundle distribution tool
9              
10             our $VERSION = '0.198';
11             # AUTHORITY
12              
13 20     20   12360 use Data::Printer; # For DEBUG. TODO: Comment this out for a normal release.
  20         571299  
  20         155  
14 20     20   2793 use Scalar::Util qw(refaddr reftype);
  20         56  
  20         1346  
15 20     20   9464 use Scalar::Does -constants, does => { -as => 'it_does' };
  20         2019167  
  20         359  
16 20     20   52678 use List::Util 1.45 qw(first all any none pairs pairgrep unpairs uniq);
  20         499  
  20         2181  
17 20     20   8719 use List::MoreUtils qw(arrayify);
  20         131792  
  20         194  
18 20     20   29935 use Hash::MoreUtils qw(slice_grep);
  20         40683  
  20         1553  
19              
20              
21              
22 20     20   10189 use Dist::Zilla::PluginBundle::Author::TABULO::Config qw(configuration detect_settings);
  20         96  
  20         397  
23 20     20   13811 use Dist::Zilla::Util;
  20         54421  
  20         664  
24 20     20   234 use Module::Runtime qw(require_module use_module);
  20         60  
  20         212  
25 20     20   9332 use Devel::CheckBin 'can_run';
  20         1938744  
  20         1563  
26 20     20   199 use Path::Tiny;
  20         50  
  20         989  
27 20     20   9261 use CPAN::Meta::Requirements;
  20         75322  
  20         642  
28 20     20   187 use Term::ANSIColor 'colored';
  20         53  
  20         1554  
29             eval { +require Win32::Console::ANSI } if $^O eq 'MSWin32';
30 20     20   152 use Config;
  20         54  
  20         1560  
31              
32              
33             # multivalue aliases. name => [ @aliases ]
34             our %PINFO = (
35             commit_files_from_release => { multivalue =>1, aka => 'commit_file_from_release', },
36             copy_files_from_release => { multivalue =>1, aka => 'copy_file_from_release', },
37             installers => { multivalue =>1, aka => 'installer', },
38             never_gather => { multivalue =>1, aka => 'do_not_gather', },
39             spellcheck_dirs => { multivalue =>1, aka => 'spellcheck_dir', },
40             stopwords => { multivalue =>1, aka => 'stopword', },
41             );
42              
43             use vars (
44 20         1540 '%PINFO', # Will be looked up by mhs_dictionnary() -- which is a general purpose 'has-munger'
45             '%PROPS', # Will be populated by mhs_dictionnary() -- which is a general purpose 'has-munger'
46             '%mungers',
47 20     20   139 );
  20         61  
48              
49              
50 20         346 use Banal::Util::Mini qw( hash_access inverse_dict maybe_kv peek
51 20     20   151 tidy_arrayify sanitize_env_var_name suffixed );
  20         51  
52 20     20   36464 use Banal::Dist::Util::Pause qw(pause_config);
  20         17405  
  20         141  
53 20     20   12186 use Banal::Moosy::Mungers qw(mhs_dictionary mhs_lazy_ro mhs_fallbacks);
  20         46752  
  20         144  
54             BEGIN {
55             %mungers = (
56 40         61530 haz => [ sub {; mhs_lazy_ro() } ],
57 400         27299 haz_bool => [ sub {; mhs_lazy_ro(isa=>'Bool') } ],
58 0         0 haz_int => [ sub {; mhs_lazy_ro(isa=>'Int') } ],
59 340         23086 haz_str => [ sub {; mhs_lazy_ro(isa=>'Str') } ],
60 120         9630 haz_strs => [ sub {; mhs_lazy_ro(isa=>'ArrayRef[Str]', traits=>['Array'] ) } ],
61 20     20   11648 haz_hash => [ sub {; mhs_lazy_ro(isa=>'HashRef', traits=>['Hash'] ) } ],
  120         8455  
62             );
63 120         1332 push @{$mungers{$_}},(
64 1020         37080 sub {; mhs_dictionary( src=> \%PINFO) },
65 1020         78582 sub {; mhs_fallbacks() },
66             # sub {; mhs_dictionary( dest=>\%PROPS) },
67 20         166 ) for (sort keys %mungers)
68             }
69              
70              
71              
72             # satisfy requirements by the consumed banal role : ..::Role::PluginBundle::Easier
73             sub _extra_args;
74             sub payload;
75              
76             #use Types::Standard;
77             #use Type::Utils qw(enum subtype where class_type);
78 20     20   8909 use Moose::Util::TypeConstraints qw(enum subtype where class_type);
  20         2503882  
  20         273  
79 20     20   27840 use Moose;
  20         2593603  
  20         197  
80 20     20   164051 use MooseX::MungeHas { %mungers };
  20         45741  
  20         262  
81             with ( 'Banal::Dist::Zilla::Role::PluginBundle::Easier',
82             'Banal::Role::Fallback::Moo',
83             );
84 20     20   112274 use namespace::autoclean;
  20         64  
  20         232  
85              
86             # Forward subroutine declarations (as needed)
87             sub _msg;
88              
89              
90             # plural values (array-ref) expected
91             sub kvh_promote_mv(@) {
92 40 50   40 0 212 my $fields = ref ($_[0]) eq 'ARRAY' ? shift : [];
93              
94 40         469 map {;
95 240         980 my ($k, $v) = ($_->key, $_->value); # 'pairs' come handy
96 240 50       1313 local %_ = (ref($v) eq 'HASH') ? (%$v) : ();
97 240         900 my @nv = tidy_arrayify( @_{@$fields} ); # We flatten a hash slice that gathers any existing values from any of the given fields
98 240         3539 ($k => [@nv] )
99             } pairs @_
100             }
101              
102             # Scalar values expected
103             sub kvh_promote(@) {
104 0 0   0 0 0 my $fields = ref ($_[0]) eq 'ARRAY' ? shift : [];
105              
106 0         0 map {;
107 0         0 my ($k, $v) = ($_->key, $_->value); # 'pairs' come handy
108 0 0       0 local %_ = (ref($v) eq 'HASH') ? (%$v) : ();
109 0     0   0 my $nv = first { defined } @_{@$fields};
  0         0  
110 0         0 ($_->key, $nv)
111             } pairs @_
112             }
113              
114              
115             sub map_name_to_aliases(@) {
116 40     40 0 523 kvh_promote_mv( [qw(aka alias aliases) ], @_ )
117             }
118              
119             # multivalue aliases. name => [ @aliases ]
120             our %AKA = map_name_to_aliases (%PINFO);
121             our %AKA_MV = map_name_to_aliases slice_grep { $_{$_}->{multivalue} // 0 } (\%PINFO) ;
122             our %MV_ALIASES = inverse_dict(%AKA);
123              
124              
125             # multivalue aliases
126             # our %MV_ALIASES = (
127             # commit_file_from_release => 'commit_files_from_release',
128             # copy_file_from_release => 'copy_files_from_release',
129             # installer => 'installers',
130             # do_not_gather => 'never_gather',
131             # spellcheck_dir => 'spellcheck_dirs',
132             # stopword => 'stopwords',
133             # );
134              
135             # TABULO :
136             # DZIL wants us to declare multi-value INI parameters like below
137             # We declare both singular and plural forms for the same things to reduce hassle.
138             sub mvp_multivalue_args {
139             map {;
140             ($_, $_.'_implicit')
141             } (%MV_ALIASES);
142             }
143              
144              
145             # our %MV_IMPLICIT = map {; ($_->key . '_implicit' => $_->value . '_implicit' ) }
146 39     39 0 6964 sub mvp_aliases { +{ %MV_ALIASES } }
147              
148              
149             # plugins that use the network when they run
150             sub _network_plugins
151             {
152 5     5   4585639 qw(
153             PromptIfStale
154             Test::Pod::LinkCheck
155             Test::Pod::No404s
156             Git::Remote::Check
157             CheckPrereqsIndexed
158             CheckIssues
159             UploadToCPAN
160             Git::Push
161             );
162             }
163              
164             #
165             # NOTE: 'haz' is our shorthand form of 'has' created with the help of 'MooseX::MungeHas' and some of our own craft.
166             #
167             # It reduces a lot of the noise, which also means you may immediately notice what is going on.
168              
169             # The specific munger function we are using here 'mhs_lazy_ro_with_fallbacks' implies :
170             # (is=>ro, lazy=1, initargs=>undef)
171             #
172             # Also, it will automatically create a 'default' subroutine that will invoke the 'fallback' method (defined below for this class).
173             # In this particular case, our 'fallback' method will make use of Config settings, which supports author-specific default values,
174             # and falling back to global defaults if necessary. It also supports the notions of :
175             # - a preffered default ('apriori' parameter), which will be tried before going into the fallbak mechanism described above.
176             # - an ultimate default ('def' parameter), which will be used if the Config fallback mechanism could not find an applicable default setting.
177             #
178             # When present, the 'apriori/mid/def' parameters should be one of:
179             # - a SCALAR value
180             # _ a subroutine reference (which will be invoked to use its return value)
181             # - An reference to an array
182             #
183             # Also, the fallback method also supports specifying a set of aliases (via 'aka' or 'alias' parameters)
184             #
185              
186              
187             haz_bool airplane =>( def => 0, );
188             haz_bool fake_release =>( apriori => sub { $ENV{FAKE_RELEASE} }, def => 0, );
189             haz_bool surgical_podweaver =>( def => 0, );
190             haz_bool commit_copied =>( def => 1, ); # + by TABULO
191             haz_bool verify_phases =>( def => 0, ); # + by TABULO
192             haz_bool allow_insecure_operations =>( def => 0, ); # + by TABULO
193             haz_bool install_release_from_cpan =>( def => 0, ); # + by TABULO
194              
195              
196             haz server =>( def => 'github', isa => enum([qw(github bitbucket gitmo p5sagit catagits none)]),);
197             haz_str licence =>( def => sub { $_[0]->spelling eq 'GB' ? 'LICENCE' : 'LICENSE' }, aka=>[qw( license) ], );
198 39     39 0 1687 sub license { shift->licence(@_) }
199             haz_str max_target_perl =>( def => '5.006', aka=> 'Test::MinimumVersion.max_target_perl', );
200             haz_str portability_options =>( def => '', aka=>[qw( Portability.options Test::Portability.options )],);
201             haz_str spelling =>( def => 'US', ); # + by TABULO
202             haz_str static_install_mode =>( def => 'no', aka => 'StaticInstall.mode', );
203             haz_str weaver_config =>( def => sub { $_[0]->_bundle_ini_section_name }, );
204              
205              
206             # Changes file handling
207             haz nextrelease_entry_columns =>( def => 10, isa => subtype('Int', where { $_ > 0 && $_ < 20 }),
208             aka=>[qw( changes_version_columns
209             )],);
210              
211             haz_str nextrelease_entry_time_zone =>( def =>'UTC',
212             aka=>[qw( changes_version_time_zone
213             changes_version_timezone
214             nextrelease_entry_timezone
215             NextRelease.time_zone
216             )],);
217              
218             haz_str nextrelease_entry_format =>(
219             def=>sub {; '%-' . ($_[0]->nextrelease_entry_columns - 2) . 'v %{yyyy-MM-dd HH:mm:ss\'Z\'}d%{ (TRIAL RELEASE)}T' },
220             aka=>[qw( changes_version_format
221             NextRelease.format )], );
222              
223             # $VERSION management
224             haz_bool bump_version_global =>( def => 1,
225             aka=>[qw( BumpVersionAfterRelease.global
226             BumpVersionAfterRelease::Transitional.global )],); # + by TABULO
227              
228             haz_str fallback_version_provider =>( def => 'Git::NextVersion',
229             aka=> 'RewriteVersion::Transitional.fallback_version_provider', );
230              
231             haz_bool rewrite_version_global =>( def => 1,
232             aka=>[qw( RewriteVersion.global
233             RewriteVersion::Transitional.global ) ],); # + by TABULO
234              
235             haz_str version_regexp =>( def => '^v([\d._]+)(-TRIAL)?$',
236             aka=>[qw( RewriteVersion::Transitional.version_regexp
237             Git::NextVersion.version_regexp )], );
238              
239              
240             # VCS options, added by TABULO [ 2018-01-16 ]
241             haz_str tag_format => ( def => 'v%v', aka => 'Git::Tag.tag_format', );
242             haz_str tag_message => ( def => 'v%v%t', aka => 'Git::Tag.tag_message', );
243             haz_str release_snapshot_commit_msg => ( def => '%N-%v%t%n%n%c', );
244              
245             # Git information (normally detected automatically). + by TABULO [ 2018-01-16 ]
246             haz_str git_remote => ( def => 'origin', );
247             haz_str git_branch => ( def => 'master', );
248             haz_str git_remote_branch => ( def => sub {; shift->git_branch // 'master' }, );
249              
250             # Boolean switches for VCS (git, etc) checks,. + by TABULO [ 2018-06-24 ]
251             haz_bool check_vcs =>( );
252             haz_bool check_vcs_more =>( def => sub {; $_[0]->check_vcs // !($_[0]->fake_release // 0) }, );
253              
254             # The below are UNDOCUMENTED for the moment:
255             haz_bool check_vcs_clean =>( def => sub {; $_[0]->check_vcs // 1 }, );
256             haz_bool check_vcs_clean_initial =>( def => sub {; $_[0]->check_vcs_clean // 1 }, );
257             haz_bool check_vcs_clean_after_tests =>( def => sub {; $_[0]->check_vcs_clean // 1 }, );
258              
259             haz_bool check_vcs_merge_conflicts =>( def => sub {; $_[0]->check_vcs_more // 1 }, );
260             haz_bool check_vcs_correct_branch =>( def => sub {; $_[0]->check_vcs_more // 1 }, );
261             haz_bool check_vcs_remote_branch =>( def => sub {; $_[0]->check_vcs_more // 1 }, );
262              
263             # NOTE: no support yet for depending on a specific version of an installer plugin --
264             # but [PromptIfStale] generally makes that unnecessary
265             haz_strs commit_file_after_release =>(
266             sort =>1,
267             blankers =>'none',
268             def => sub { [] },
269             aka => { commit_files_after_release => 'elements' },
270             );
271              
272             haz_strs copy_file_from_release =>(
273             sort =>1,
274             blankers =>'none',
275             def => sub { [] },
276             aka => { copy_files_from_release => 'elements' },
277             );
278              
279             haz_strs do_not_gather =>(
280             sort =>1,
281             blankers =>'none',
282             def => sub { [] },
283             aka => { never_gather => 'elements' },
284             ); # + by TABULO
285              
286             haz_strs installer =>(
287             blankers =>'none',
288             def => sub { [] },
289             aka => { installers => 'elements' },
290             );
291              
292             #sub spellcheck_dir { $_[0]->spellcheck_dirs }
293             haz_strs spellcheck_dirs =>( def => sub { [ qw(bin examples lib script t xt) ] },
294             sort=>1, blankers=>'none',
295             aka => 'spellcheck_dir',
296             );
297              
298              
299             #sub stopword { $_[0]->stopwords }
300             haz_strs stopwords =>( def => sub { [qw(irc)] },
301             sort=>1, blankers=>'none',
302             aka => 'stopword',
303             ); # + by TABULO
304              
305              
306             around commit_files_after_release => sub {
307             my $orig = shift; my $self = shift;
308             my $cpfr = $self->copy_files_from_release;
309             my @extras = arrayify ($self->commit_copied ? $cpfr : [] );
310             my $oresult = $self->$orig(@_);
311              
312             [ sort(uniq((grep { defined $_} arrayify( $oresult, @extras)))) ];
313             };
314              
315              
316             # Note: no support yet for depending on a specific version of the plugin --
317             # but [PromptIfStale] generally makes that unnecessary
318             haz_bool _keen_on_static_install =>( def => 0, aka => 'keen_on_static_install', );
319             haz_hash _extra_args =>( def => sub { +{} }, aka => 'extra_args', );
320              
321              
322             # The following attributes are NOT allowed to have AUTHOR SPECIFIC fallbacks
323             # 'author_specific => 0' allows us to avoid an infinte loop...
324             # -- because the usual fallbacks include known_author_prefs which depend on 'authority' ...
325             haz_str authority =>( def => 'cpan:TABULO', author_specific => 0, aka => 'Authority.authority', );
326             haz_bool _no_author_specific_prefs =>( def => 0, author_specific => 0, aka => 'no_author_specific_preferences',);
327             haz_hash _known_authors =>( def => sub { +{} }, author_specific => 0, aka => 'known_authors', );
328              
329              
330             # The following attributes are NOT allowed to have FALLBACKS at all (because they provide the basis for the fallback mechanism)
331             haz_hash _defaults =>( default => sub { shift->_config('defaults') // {} }, );
332             haz_hash _settings_detected =>( default => sub { +{ detect_settings(plugin_bundle => shift) } }, );
333             haz_hash _settings =>( default => sub { shift->_config() // +{} }, );
334             haz_hash _author_specific_prefs => (
335             default => sub {
336             my $o = $_[0];
337             ( $o->_no_author_specific_prefs ? +{} : hash_access( $o->_known_authors, $o->authority, 'prefs') ) // {}
338             },
339             );
340              
341             # The following attributes currently BYPASS the implicit FALLBACK mechanism (for lack of a simple way)
342             # haz_bool static_install_dry_run => (
343             # default => sub {
344             # my $self = shift;
345             # # only set x_static_install using auto mode for distributions where the authority is known to be 'keen on' static install (e.g. ETHER)
346             # # (for all other distributions, set explicitly to on or off)
347             # # Note that this is just the default; if a dist.ini changed these values, ConfigSlicer will apply it later
348             # my $mode = $self->static_install_mode;
349             # my $keen = $self->_keen_on_static_install // 0;
350             # my $r = $self->_resolve( 'StaticInstall.dry_run', 'static_install_dry_run' );
351             # $r = undef if (defined $r) && ($r eq '');
352             # $r //= (defined $mode) && ($mode eq 'auto') ? !$keen : undef;
353             # $r //= 0;
354             # return $r;
355             # },
356             # );
357              
358             # The following attributes currently BYPASS the implicit FALLBACK mechanism (for lack of a simple way)
359             haz_bool static_install_dry_run => (
360             def => sub {
361             my $self = shift;
362             # only set x_static_install using auto mode for distributions where the authority is known to be 'keen on' static install (e.g. ETHER)
363             # (for all other distributions, set explicitly to on or off)
364             # Note that this is just the default; if a dist.ini changed these values, ConfigSlicer will apply it later
365             !($self->_keen_on_static_install // 0);
366             },
367             );
368              
369              
370             around static_install_dry_run => sub {
371             my ($orig, $self) = (shift, shift);
372             my $mode = $self->static_install_mode // '';
373             my $r = $self->$orig(@_);
374             $r = ($mode eq 'auto') ? $r : 0;
375             $r //= 0;
376             };
377              
378              
379              
380             # "PROTECTED" METHODS (OK to use/override in inherited classes)
381 116     116   557 sub _bundle_ini_section_name { $_[0]->_config('bundle', 'ini_section_name') }
382 0     0   0 sub _pause_config { shift; pause_config(@_) } # return username, password from ~/.pause
  0         0  
383 233     233   9305 sub _config { shift; configuration( @_) } # Retrieve a setting, to ease sub-classing and such.
  233         1241  
384              
385             # Below are computed directly from settings and also possibly depend on state.
386             # $detected : we try to auto-detect some defaults from the environment or the context
387             # such as the repository 'server'
388             sub _fallback_settings { # required by C<Banal::Role::Fallbacks>
389 2100     2100   334775 my $self = shift;
390 2100 50       4073 my %opt = %{ (ref($_[0]) eq 'HASH') ? shift : +{} };
  2100         8513  
391 2100         8920 %opt = (%opt, @_);
392 2100         4545 my (%res, @src);
393              
394             # %ENV hash wins over all of the others, unless we are asked not to include it in the bunch.
395 2100 50       5789 unless ( $opt{'no_env'} ) {
396 2100   50     8802 my $pfx = $opt{env_key_prefix} // 'DZIL_';
397 2100   50 4194   24903 $res{source_opts}{refaddr \%ENV}{map_keys} ||= sub { map {; sanitize_env_var_name($pfx . uc $_) } @_ };
  4194         1098518  
  6770         45153  
398 2100         5525 push @src, \%ENV;
399             }
400              
401             # Then comes the rest of them... Some of them (like payload) make sense only for OBJECT invocation, while others
402             # may also make sense in a CLASS invocation context.
403 2100 50 33     82436 push @src, $self->payload() if $opt{payload} && ref $self;
404 2100 100       74112 push @src, $self->_author_specific_prefs() if $opt{author_specific}; # depends on state.
405 2100 50 33     90851 push @src, $self->_defaults if $opt{defaults} // $opt{generic};
406 2100 50 33     82624 push @src, $self->_settings_detected() if $opt{detected} // $opt{generic};
407 2100 50 33     79956 push @src, $self->_settings() if $opt{settings} // $opt{generic};
408              
409 2100         30045 $res{sources} = [ grep { defined } arrayify( @src ) ];
  12483         30518  
410              
411 2100 50       16778 return wantarray ? (%res) : \%res;
412             }
413              
414              
415              
416             sub BUILD
417             {
418 39     39 0 8028 my $self = shift;
419              
420             # say STDERR 'Here is my humble self : ' . np $self;
421              
422 39 100       1386 if ($self->airplane)
423             {
424 3         750 warn _msg ( colored('building in airplane mode - plugins requiring the network are skipped, and releases are not permitted', 'yellow'));
425             # doing this before running configure means we can be sure we update the removal list before
426             # our _removed_plugins attribute is built.
427 3         73 push @{ $self->payload->{ $self->plugin_remover_attribute } }, $self->_network_plugins;
  3         115  
428             }
429             }
430              
431              
432              
433             sub check
434             {
435 39     39 0 228 my $self = shift;
436 39         1998 my @installers = tidy_arrayify( $self->installers );
437              
438             warn _msg 'no "bash" executable found; skipping Run::AfterBuild command to update .ackrc'
439 39 0 33     13908 if not $INC{'Test/More.pm'} and not $self->_detected_bash;
440              
441             # NOTE! since the working directory has not changed to $zilla->root yet,
442             # if running this code via a different mechanism than dzil <command>, file
443             # operations may be looking at the wrong directory! Take this into
444             # consideration when running tests!
445              
446 39         2256 my $has_xs = $self->_detected_xs;
447 39 50       263 warn _msg 'XS-based distribution detected.' if $has_xs;
448 39 50 33     319 die _msg 'no Makefile.PL found in the repository root: this is not very nice for contributors!'
449             if $has_xs and not -e 'Makefile.PL';
450              
451             # check for a bin/ that should probably be renamed to script/
452             warn _msg colored('bin/ detected - should this be moved to script/, so its contents can be installed into $PATH?', 'bright_red')
453 39 50 33     1065 if -d 'bin' and grep { $_ eq 'ModuleBuildTiny' } $self->installers;
  0         0  
454              
455             warn _msg colored('You are using [ModuleBuild] as an installer, WTF?!', 'bright_red')
456 48     48   3679 if any { $_->isa('Dist::Zilla::Plugin::ModuleBuild') }
457 39 50       769 map { Dist::Zilla::Util->expand_config_package_name($_) } @installers;
  48         2187  
458              
459             # this is better than injecting a perl prereq for 5.008, to allow MBT to
460             # become more 5.006-compatible in the future without forcing the distribution to be re-released.
461             die _msg 'Module::Build::Tiny should not be used in distributions that are targeting perl 5.006!'
462 39 50 50 48   614 if any { /ModuleBuildTiny/ } @installers and ($self->max_target_perl // 0) < '5.008';
  48   66     1256  
463              
464 39 0 33     4274 warn _msg colored('.git is missing and META.json is present -- this looks like a CPAN download rather than a git repository. You should probably run '
    50 33        
465             . (-f 'Build.PL' ? 'perl Build.PL; ./Build' : 'perl Makefile.PL; make') . ' instead of using dzil commands!', 'yellow')
466             if not -d '.git' and -f 'META.json' and not $self->_plugin_removed('Git::GatherDir');
467              
468 39   50     2098 my $server = $self->server // '';
469 39 100 100     8483 warn _msg colored(
470             "server = '$server': recommend instead using server = github and GithubMeta.remote = '$server' with a read-only mirror", 'yellow')
471             if $server ne 'github' and $server ne 'none';
472              
473 39         267 return $self;
474             }
475              
476             sub configure
477             {
478 39     39 0 9200 my $self = shift->check(@_);
479              
480             # some local variables for handier and faster access.
481 39   50     1414 my $server = $self->server // '';
482 39         666 my $examples_finder_name = $self->_bundle_ini_section_name . '/Examples';
483 39         1697 my $licence = $self->license;
484 39         13369 my $surgical = $self->surgical_podweaver;
485              
486 39         9464 my @copy_files_from_release = tidy_arrayify ( $self->copy_files_from_release );
487 39         19473 my @installers = tidy_arrayify ( $self->installers );
488 39         2781 my @never_gather = tidy_arrayify ( $self->never_gather );
489 39         22396 my @stopwords = tidy_arrayify ( $self->stopwords );
490              
491 39   50     14346 my $static_install_mode = $self->static_install_mode // '';
492 39   50     8556 my $static_install_dry_run = $self->static_install_dry_run // 0;
493 39         240 my $v; # used in various places below in order to hold temporary values.
494              
495             my $d; # $d is for DEBUGGING
496 39         0 my @d;
497              
498             # say STDERR 'Here is my humble self AGAIN (during configure) : ' . np $self;
499             # say STDERR 'Stopwords are : ' . np @stopwords;
500             # say STDERR 'Installers are : ' . np @installers;
501             # say STDERR 'Server is : ' . "'$server'";
502              
503             my @plugins = (
504              
505             # TAU : Just in case the name is not set in 'dist.ini'
506             'NameFromDirectory',
507              
508             # VersionProvider
509             # see [@Git::VersionManager]
510              
511             # BeforeBuild
512             # [ 'EnsurePrereqsInstalled' ], # FIXME: use options to make this less annoying!
513             [ 'PromptIfStale' => 'stale modules, build' => { phase => 'build', module => [ $self->meta->name ] } ],
514             [ 'PromptIfStale' => 'stale modules, release' => { phase => 'release', check_all_plugins => 1, check_all_prereqs => 1 } ],
515              
516             # ExecFiles
517 179     179   3812 (-d ($self->payload->{'ExecDir.dir'} // 'script') || any { /^ExecDir\./ } keys %{ $self->payload })
518             ? [ 'ExecDir' => { dir => 'script' } ] : (),
519              
520             # Finders
521             [ 'FileFinder::ByName' => Examples => { dir => 'examples' } ],
522              
523             # Gather Files
524              
525             [ 'Git::GatherDir' => { ':version' => '2.016',
526             include_dotfiles => $self->_resolve(qw( Git::GatherDir.include_dot_files include_dot_files) ) // 1 ,
527             @never_gather ? ( exclude_filename => \@never_gather) : ()
528             } ],
529              
530             qw(MetaYAML MetaJSON Readme Manifest),
531             [ 'License' => { ':version' => '5.038', filename => $self->licence } ],
532             [ 'GenerateFile::FromShareDir' => 'generate CONTRIBUTING' => { -dist => $self->_config('bundle', 'dist_name'), -filename => 'CONTRIBUTING', has_xs => $self->_detected_xs } ],
533             [ 'InstallGuide' => { ':version' => '1.200005' } ],
534              
535             [ 'Test::Compile' => { ':version' => '2.039', bail_out_on_fail => 1, xt_mode => 1,
536             script_finder => [qw(:PerlExecFiles ), $examples_finder_name ] } ],
537             [ 'Test::NoTabs' => { ':version' => '0.08', finder => [qw(:InstallModules :ExecFiles), $examples_finder_name, qw(:TestFiles :ExtraTestFiles)] } ],
538             [ 'Test::EOL' => { ':version' => '0.17', finder => [qw(:InstallModules :ExecFiles), $examples_finder_name, qw(:TestFiles :ExtraTestFiles)] } ],
539             'MetaTests',
540             [ 'Test::CPAN::Changes' => { ':version' => '0.012' } ],
541             'Test::ChangesHasContent',
542             [ 'Test::MinimumVersion' => { ':version' => '2.000003', maybe_kv(max_target_perl => $self->max_target_perl) } ], # ETHER had 5.006
543             [ 'PodSyntaxTests' => { ':version' => '5.040' } ],
544             [ 'PodCoverageTests' => { ':version' => '5.040' } ],
545             [ 'Test::PodSpelling' => { ':version' => '2.006003',
546             ( @stopwords ? ( stopwords => [ @stopwords ] ) : () ),
547             directories => [qw(bin examples lib script t xt)] }
548             ],
549              
550             #[Test::Pod::LinkCheck] many outstanding bugs
551             ($ENV{CONTINUOUS_INTEGRATION} ? () : [ 'Test::Pod::No404s' => { ':version' => '1.003' } ] ),
552             [ 'Test::Kwalitee' => { ':version' => '2.10', filename => 'xt/author/kwalitee.t' } ],
553             [ 'MojibakeTests' => { ':version' => '0.8' } ],
554             [ 'Test::ReportPrereqs' => { ':version' => '0.022', verify_prereqs => 1,
555 38     38   11555 version_extractor => ( ( any { $_ ne 'MakeMaker' } @installers) ? 'Module::Metadata' : 'ExtUtils::MakeMaker' ),
556             include => [ sort ( qw(autodie JSON::PP Sub::Name YAML), $self->_plugin_removed('PodCoverageTests') ? () : 'Pod::Coverage' ) ] } ],
557              
558             [ 'Test::Portability' => { ':version' => '2.000007',
559             # options => 'test_dos_length = 0, test_one_dot = 0',
560             ( ($v = ($self->portability_options // ''))
561             ? (options => $v)
562             : ()
563             )
564             }],
565             [ 'Test::CleanNamespaces' => { ':version' => '0.006' } ],
566              
567              
568             # Munge Files
569             [ 'Git::Describe' => { ':version' => '0.004', on_package_line => 1 } ],
570             [ # Weave POD ( possibly in a 'surgical' fashion)
571             ($surgical ? 'SurgicalPodWeaver' : 'PodWeaver') => {
572             $surgical ? () : ( ':version' => '4.005' ),
573             -f 'weaver.ini' ? () : ( config_plugin => $self->weaver_config ),
574             replacer => $self->_resolve( ( $surgical ? qw( SurgicalPodWeaver.replacer ) : () ),
575             qw( PodWeaver.replacer ), # checked in any case.
576             ) // 'replace_with_comment',
577             post_code_replacer => $self->_resolve( ( $surgical ? qw( SurgicalPodWeaver.post_code_replacer ) : () ),
578             qw( PodWeaver.post_code_replacer ), # checked in any case.
579             ) // 'replace_with_nothing',
580             }
581             ],
582              
583             # Metadata
584             ( $server =~ /^github$/i ) ? [ 'GithubMeta' => { ':version' => '0.54', homepage => 0, issues => 0 } ] : (),
585             [ 'AutoMetaResources' => { 'bugtracker.rt' => 1,
586             ( $server !~ /^(github|custom|none)$/i )
587             ? ( "repository.${server}" => ( $self->_resolve("server_amr_opts_${server}") // 1 ) )
588             : ()
589             } ],
590              
591             [ 'Authority' => { ':version' => '1.009',
592             authority => $self->authority,
593             do_munging => ( $self->_resolve('Authority.do_munging') // 0 ),
594             locate_comment => ( $self->_resolve('Authority.locate_comment') // 0 ),
595             }
596             ],
597 390         16746 [ 'MetaNoIndex' => { directory => [ uniq ( qw(t xt), grep { -d } @{ $self->_resolve_mv('MetaNoIndex.directory') } ) ],
  39         5972  
598             },
599             ],
600             [ 'MetaProvides::Package' => { ':version' => '1.15000002', finder => ':InstallModules', meta_noindex => 1, inherit_version => 0, inherit_missing => 0 } ],
601             'MetaConfig',
602             [ 'Keywords' => { ':version' => '0.004' } ],
603             ($Config{default_inc_excludes_dot} ? [ 'UseUnsafeInc' => { dot_in_INC => 0 } ] : ()),
604             # [Git::Contributors]
605             # [StaticInstall]
606              
607             # Register Prereqs
608             # (MakeMaker or other installer)
609             [ 'AutoPrereqs' => { ':version' => '5.038' } ],
610             [ 'Prereqs::AuthorDeps' => { ':version' => '0.006', relation => 'suggests' } ],
611             [ 'MinimumPerl' => { ':version' => '1.006', configure_finder => ':NoFiles' } ],
612             [ 'Prereqs' => pluginbundle_version => {
613             '-phase' => 'develop', '-relationship' => 'recommends',
614             $self->meta->name => $self->VERSION,
615             } ],
616             ($self->surgical_podweaver ? [ 'Prereqs' => pod_weaving => {
617             '-phase' => 'develop', '-relationship' => 'suggests',
618             'Dist::Zilla::Plugin::SurgicalPodWeaver' => 0
619             } ] : ()),
620              
621             # Install Tool (some are also Test Runners)
622             @installers, # options are set lower down, via %extra_args
623              
624             # we prefer this to run after other Register Prereqs plugins
625             [ 'Git::Contributors' => { ':version' => '0.029', order_by => 'commits' } ],
626              
627             # must appear after installers; also note that MBT::*'s static tweak is consequently adjusted, later
628             [ 'StaticInstall' => { ':version' => '0.005', mode => $static_install_mode, dry_run => $static_install_dry_run } ],
629              
630             # Test Runners (load after installers to avoid a rebuild)
631             [ 'RunExtraTests' => { ':version' => '0.024' } ],
632              
633             # After Build
634             'CheckSelfDependency',
635              
636             # Update '.ackrc' (TAU: actually, no longer needed since ack v2.16, ... So it defaults to doing nothing)
637             ( $self->_detected_bash && ( $self->_resolve('update_ackrc_after_build') // 0 ) && ( $v = $self->_resolve('update_ackrc.cmd') ) ?
638             [ 'Run::AfterBuild' => '.ackrc' => { ':version' => '0.038', quiet => 1, run => $v, } ]
639             : ()
640             ),
641             # Update the '.latest' link
642             ( ( $self->_resolve('update_latest_links_after_build') // 1 ) && ( $v = $self->_resolve('update_latest_links.eval') ) ?
643             [ 'Run::AfterBuild' => '.latest' => { ':version' => '0.041', quiet => 1, fatal_errors => 0, eval => $v, } ]
644             : ()
645             ),
646              
647              
648             # Before Release
649             [ 'CheckStrictVersion' => { decimal_only => ( $self->_resolve('CheckStrictVersion.decimal_only') // 1 ),
650             tuple_only => ( $self->_resolve('CheckStrictVersion.tuple_only') // 0 ),
651             }
652             ],
653             'CheckMetaResources',
654             'EnsureLatestPerl',
655              
656             # if in airplane mode, allow our uncommitted dist.ini edit which sets 'airplane = 1'
657              
658              
659             ( $self->check_vcs_clean_initial ?
660             [ 'Git::Check' => 'initial check' => { allow_dirty => [ $self->airplane ? 'dist.ini' : '' ] } ]
661             : ()),
662              
663              
664             ( $self->check_vcs_merge_conflicts ?
665             'Git::CheckFor::MergeConflicts'
666             : ()),
667              
668             ( $self->check_vcs_correct_branch ?
669             [ 'Git::CheckFor::CorrectBranch' => { ':version' => '0.004', release_branch => $self->git_branch } ]
670             : ()),
671              
672             ( $self->check_vcs_remote_branch ?
673             [ 'Git::Remote::Check' => { branch => $self->git_branch, remote_branch => $self->git_remote_branch } ]
674             : ()),
675              
676              
677             # [ 'Git::CheckFor::CorrectBranch' => { ':version' => '0.004', release_branch => $self->git_branch } ],
678             # [ 'Git::Remote::Check' => { branch => $self->git_branch, remote_branch => $self->git_remote_branch } ],
679             [ 'CheckPrereqsIndexed' => { ':version' => '0.019' } ],
680              
681             'TestRelease',
682              
683             ( $self->check_vcs_clean_after_tests ?
684             [ 'Git::Check' => 'after tests' => { allow_dirty => [''] } ]
685             : ()),
686              
687             'CheckIssues',
688             # (ConfirmRelease)
689              
690             # Releaser
691             $self->fake_release
692 39 50 33     843 ? do { warn _msg colored('FAKE_RELEASE set - not uploading to CPAN', 'yellow'); 'FakeRelease' }
  3 50 50     530  
  3 50 50     114  
    50 50        
    100 50        
    50 50        
    100 100        
    100 100        
    100 33        
    100 33        
    100 50        
    100 50        
    100 33        
    100          
    50          
    100          
    50          
    50          
    100          
    50          
    100          
    100          
    100          
    50          
    100          
    50          
    50          
    50          
693             : 'UploadToCPAN',
694              
695             # After Release
696             ( ($v=$self->licence) && -e "$v" ?
697             [ 'Run::AfterRelease' => "remove old $v" => { ':version' => '0.038', quiet => 1, eval => qq!unlink '$v'! } ]
698             : ()),
699              
700             ( -e 'README.md' ?
701             [ 'Run::AfterRelease' => 'remove old READMEs' => { ':version' => '0.038', quiet => 1, eval => q!unlink 'README.md'! } ]
702             : ()),
703              
704             ( @copy_files_from_release ?
705             [ 'CopyFilesFromRelease' => 'copy generated files' => { filename => [ @copy_files_from_release ] } ]
706             : ()),
707              
708             [ 'ReadmeAnyFromPod' => { ':version' => '0.142180', type => 'pod', location => 'root', phase => 'release' } ],
709             );
710              
711             # method modifier will also apply default configs, compile develop prereqs
712 39         11847 $self->add_plugins(@plugins);
713              
714             # plugins to do with calculating, munging, incrementing versions
715 39         69406 my $rwt = 'RewriteVersion::Transitional'; # Just to shorten some lines below
716 39 50       1793 $self->add_bundle('@Git::VersionManager' => {
    50          
    50          
    50          
    50          
    50          
    50          
717             $self->rewrite_version_global ? ( "${rwt}.global" => $self->rewrite_version_global ) : (),
718             $self->fallback_version_provider ? ( "${rwt}.fallback_version_provider" => $self->fallback_version_provider ) : (),
719             $self->version_regexp ? ( "${rwt}.version_regexp" => $self->version_regexp ) : (),
720              
721             # for first Git::Commit
722             commit_files_after_release => [ arrayify($self->commit_files_after_release) ],
723              
724             # because of [Git::Check], only files copied from the release would be added -- there is nothing else
725             # hanging around in the current directory
726             'release snapshot.add_files_in' => ['.'],
727             $self->release_snapshot_commit_msg ? ( 'release snapshot.commit_msg' => $self->release_snapshot_commit_msg ) : (),
728              
729             $self->tag_format ? ( 'Git::Tag.tag_format' => $self->tag_format ) : (),
730             $self->tag_message ? ( 'Git::Tag.tag_message' => $self->tag_message ) : (),
731              
732             # if the caller set bump_only_matching_versions, then this global setting falls on the floor automatically
733             # because the bundle uses the non-Transitional plugin in that case.
734             $self->bump_version_global ? ( 'BumpVersionAfterRelease::Transitional.global' => $self->bump_version_global ) : (),
735              
736             'NextRelease.:version' => '5.033',
737             # 'NextRelease.time_zone' => 'UTC',
738             # 'NextRelease.format' => '%-' . ($self->changes_version_columns - 2) . 'v %{yyyy-MM-dd HH:mm:ss\'Z\'}d%{ (TRIAL RELEASE)}T',
739             'NextRelease.time_zone' => $self->nextrelease_entry_time_zone(),
740             'NextRelease.format' => $self->nextrelease_entry_format(),
741             });
742              
743 39 100       593587 $self->add_plugins(
744             'Git::Push',
745             $self->server eq 'github' ? [ 'GitHub::Update' => { ':version' => '0.40', metacpan => 1 } ] : (),
746             );
747              
748 39 50 33     5950 if ($self->allow_insecure_operations && $self->install_release_from_cpan) {
749             # TAU : This is protected by an expression checking 'allow_insecure_operations' because what folows is
750             # potentially quite insecure, since it would expose the author's PAUSE credentials
751             # directly on the request URL (which would travel in cleartext even under 'https').
752              
753             # install with an author-specific URL from PAUSE, so cpanm-reporter knows where to submit the report
754             # hopefully the file is available at this location soonish after release!
755 0         0 my %pause = $self->_pause_config();
756 0         0 say STDERR "PAUSE Config : " . np %pause;
757              
758 0         0 my ($user, $password) = @pause{qw(user password)};
759 0 0 0     0 $self->add_plugins(
760             [ 'Run::AfterRelease' => 'install release' => { ':version' => '0.031', fatal_errors => 0, run => 'cpanm http://' . $user . ':' . $password . '@pause.perl.org/pub/PAUSE/authors/id/' . substr($user, 0, 1).'/'.substr($user,0,2).'/'.$user.'/%a' } ],
761             ) if $user and $password;
762             }
763              
764             # halt release after pre-release checks, but before ConfirmRelease
765 39 100       9674 $self->add_plugins('BlockRelease') if $self->airplane;
766              
767 39         1432 $self->add_plugins(
768             [ 'Run::AfterRelease' => 'release complete' => { ':version' => '0.038', quiet => 1, eval => [ qq{print "release complete!\\xa"} ] } ],
769             # listed late, to allow all other plugins which do BeforeRelease checks to run first.
770             'ConfirmRelease',
771             );
772              
773             # if ModuleBuildTiny(::*) is being used, disable its static option if
774             # [StaticInstall] is being run with mode=off or dry_run=1
775 39 100 100     7749 if (($static_install_mode eq 'off' or $static_install_dry_run)
      100        
776 45     45   477 and any { /^ModuleBuildTiny/ } @installers)
777             {
778 11         133 my $mbt = Dist::Zilla::Util->expand_config_package_name('ModuleBuildTiny');
779 11     442   496 my $mbt_spec = first { $_->[1] =~ /^$mbt/ } @{ $self->plugins };
  442         1698  
  11         449  
780              
781 11         92 $mbt_spec->[-1]{static} = 'no';
782             }
783              
784             # ensure that additional optional plugins are declared in prereqs
785 39         333 my $plugin_name = 'prereqs for ' . $self->_bundle_ini_section_name;
786             $self->add_plugins(
787             [ 'Prereqs' => $plugin_name =>
788             { '-phase' => 'develop', '-relationship' => 'suggests',
789 39         1330 %{ $self->_develop_suggests_as_string_hash } } ]
  39         497  
790             );
791              
792             # listed last, to be sure we run at the very end of each phase
793 39 50       6632 $self->add_plugins(
794             [ 'VerifyPhases' => 'PHASE VERIFICATION' => { ':version' => '0.016' } ]
795             ) if $self->verify_phases;
796             }
797              
798              
799              
800              
801              
802             # PRIVATE UTILITY FUNCTIONS
803              
804             # Message text builder to be used in error output (warn, die, ...)
805             sub _msg {
806 9     9   684 state $pfx = configuration('bundle', 'msg_pfx');
807 9         427 join ('', $pfx, @_, "\n")
808             }
809              
810              
811              
812              
813             __PACKAGE__->meta->make_immutable;
814              
815             1;
816              
817             =pod
818              
819             =encoding UTF-8
820              
821             =head1 NAME
822              
823             Dist::Zilla::PluginBundle::Author::TABULO - A plugin bundle for distributions built by TABULO
824              
825             =head1 VERSION
826              
827             version 0.198
828              
829             =head1 SYNOPSIS
830              
831             In your F<dist.ini>:
832              
833             [@Author::TABULO]
834              
835             =head1 DESCRIPTION
836              
837             =for stopwords TABULO DAGOLDEN ETHER KENTNL
838             =for stopwords GitHub
839             =for stopwords optimizations repo
840              
841             This is the plug-in bundle that TABULO uses for his distributions whose starting
842             point was ETHER's.
843              
844             It exists mostly because TABULO is very lazy and wants others to be using what
845             he's using if they want to be doing work on his modules, just like KENTNL
846             and many others, I suppose...
847              
848             But since TABULO is probably even lazier than most folks; instead of starting his
849             bundle from scratch, he just shopped around to find a bundle that had the most
850             overlap with his taste or whatever; and then just slurped the whole thing,
851             even including its documentation which is what you see here and in the
852             related modules.:-)
853              
854             Admittedly, the fact that TABULO was so late in migrating to dzil worked to his
855             advantage for this particular task at least, since by that time
856             the bold and the brave had already made delicious stuff!
857              
858             Thank you ETHER!
859              
860             Thank you, too, KENTNL and DAGOLDEN, as your plugin-bundles also seem to be quite
861             good sources of inspiration!
862              
863             =head2 WARNING
864              
865             Please note that, although this module needs to be on CPAN for obvious reasons,
866             it is really intended to be a collection of personal preferences, which are
867             expected to be in great flux, at least for the time being.
868              
869             Therefore, please do NOT base your own distributions on this one, since anything
870             can change at any moment without prior notice, while I get accustomed to dzil
871             myself and form those preferences in the first place...
872             Absolutely nothing in this distribution is guaranteed to remain constant or
873             be maintained at this point. Who knows, I may even give up on dzil altogether...
874              
875             You have been warned.
876              
877             And now comes the rest of the documentation slurped right in from ETHER's GitHub
878             repo ... :-)
879              
880             =head2 DESCRIPTION (at last)
881              
882             This L<Dist::Zilla> plugin bundle is I<very approximately> equal to the
883             following F<dist.ini> (following the preamble), minus some optimizations:
884              
885             ;;; BeforeBuild
886             [PromptIfStale / stale modules, build]
887             phase = build
888             module = Dist::Zilla::Plugin::Author::TABULO
889             [PromptIfStale / stale modules, release]
890             phase = release
891             check_all_plugins = 1
892             check_all_prereqs = 1
893              
894              
895             ;;; ExecFiles
896             [ExecDir]
897             dir = script ; only if script dir exists
898              
899              
900             ;;; Finders
901             [FileFinder::ByName / Examples]
902             dir = examples
903              
904              
905             ;;; Gather Files
906             [Git::GatherDir]
907             :version = 2.016
908             exclude_filename = CONTRIBUTING
909             exclude_filename = INSTALL
910             exclude_filename = LICENCE
911             exclude_filename = LICENSE
912             exclude_filename = META.json
913             exclude_filename = Makefile.PL
914             exclude_filename = README.md
915             exclude_filename = README.pod
916             exclude_filename = TODO
917             exclude_filename = cpanfile
918             exclude_filename = inc/ExtUtils/MakeMaker/Dist/Zilla/Develop.pm
919             exclude_filename = ppport.h
920              
921             [MetaYAML]
922             [MetaJSON]
923             [Readme]
924             [Manifest]
925             [License]
926             :version = 5.038
927             filename = LICENCE ; for distributions where I have authority
928              
929             [GenerateFile::FromShareDir / generate CONTRIBUTING]
930             -dist = Dist-Zilla-PluginBundle-Author-TABULO
931             -filename = CONTRIBUTING
932             has_xs = <dynamically-determined flag>
933             [InstallGuide]
934             :version = 1.200005
935              
936             [Test::Compile]
937             :version = 2.039
938             bail_out_on_fail = 1
939             xt_mode = 1
940             script_finder = :PerlExecFiles
941             script_finder = Examples
942              
943             [Test::NoTabs]
944             :version = 0.08
945             finder = :InstallModules
946             finder = :ExecFiles
947             finder = Examples
948             finder = :TestFiles
949             finder = :ExtraTestFiles
950              
951             [Test::EOL]
952             :version = 0.17
953             finder = :InstallModules
954             finder = :ExecFiles
955             finder = Examples
956             finder = :TestFiles
957             finder = :ExtraTestFiles
958              
959             [MetaTests]
960             [Test::CPAN::Changes]
961             :version = 0.012
962             [Test::ChangesHasContent]
963             [Test::MinimumVersion]
964             :version = 2.000003
965             max_target_perl = 5.006
966             [PodSyntaxTests]
967             :version = 5.040
968             [PodCoverageTests]
969             :version = 5.040
970             [Test::PodSpelling]
971             :version = 2.006003
972             stopwords = irc
973             directory = examples
974             directory = lib
975             directory = script
976             directory = t
977             directory = xt
978              
979             ;[Test::Pod::LinkCheck] many outstanding bugs
980             [Test::Pod::No404s]
981             :version = 1.003
982             [Test::Kwalitee]
983             :version = 2.10
984             filename = xt/author/kwalitee.t
985             [MojibakeTests]
986             :version = 0.8
987             [Test::ReportPrereqs]
988             :version = 0.022
989             verify_prereqs = 1
990             version_extractor = Module::Metadata
991             include = JSON::PP
992             include = Pod::Coverage
993             include = Sub::Name
994             include = YAML
995             include = autodie
996             [Test::Portability]
997             :version = 2.000007
998             [Test::CleanNamespaces]
999             :version = 0.006
1000              
1001              
1002             ;;; Munge Files
1003             [Git::Describe]
1004             :version = 0.004
1005             on_package_line = 1
1006              
1007             [PodWeaver] (or [SurgicalPodWeaver])
1008             :version = 4.005
1009             config_plugin = @Author::TABULO ; unless weaver.ini is present
1010             replacer = replace_with_comment
1011             post_code_replacer = replace_with_nothing
1012              
1013              
1014             ;;; Metadata
1015             [GithubMeta] ; (if server = 'github' or omitted)
1016             :version = 0.54
1017             homepage = 0
1018             issues = 0
1019              
1020             [AutoMetaResources]
1021             bugtracker.rt = 1
1022             ; (plus repository.* = 1 if server = 'gitmo' or 'p5sagit')
1023              
1024             [Authority]
1025             :version = 1.009
1026             authority = cpan:TABULO
1027             do_munging = 0
1028              
1029             [MetaNoIndex]
1030             directory = corpus
1031             directory = demo
1032             directory = examples
1033             directory = fatlib
1034             directory = inc
1035             directory = local
1036             directory = perl5
1037             directory = share
1038             directory = t
1039             directory = xt
1040              
1041             [MetaProvides::Package]
1042             :version = 1.15000002
1043             finder = :InstallModules
1044             meta_noindex = 1
1045             inherit_version = 0
1046             inherit_missing = 0
1047              
1048             [MetaConfig]
1049             [Keywords]
1050             :version = 0.004
1051              
1052             ; if we are releasing with a new perl with -DDEFAULT_INC_EXCLUDES_DOT set
1053             [UseUnsafeInc]
1054             dot_in_INC = 0
1055              
1056             ;[Git::Contributors] ; below
1057             ;[StaticInstall] ; below
1058              
1059              
1060             ;;; Register Prereqs
1061             [AutoPrereqs]
1062             :version = 5.038
1063             [Prereqs::AuthorDeps]
1064             relation = suggests
1065             [MinimumPerl]
1066             :version = 1.006
1067             configure_finder = :NoFiles
1068              
1069             [Prereqs / prereqs for @Author::TABULO]
1070             -phase = develop
1071             -relationship = suggests
1072             ...all the plugins this bundle uses...
1073              
1074             [Prereqs / pluginbundle_version]
1075             -phase = develop
1076             -relationship = recommends
1077             Dist::Zilla::PluginBundle::Author::TABULO = <current installed version>
1078              
1079              
1080             ;;; Install Tool
1081             ; <specified installer(s)>
1082              
1083             [Git::Contributors]
1084             :version = 0.029
1085             order_by = commits
1086              
1087             [StaticInstall]
1088             :version = 0.005
1089             mode = auto
1090             dry_run = 1 ; only if authority is not ETHER
1091              
1092              
1093             ;;; Test Runner
1094             ; <specified installer(s)>
1095             [RunExtraTests]
1096             :version = 0.024
1097             default_jobs = 9
1098              
1099              
1100             ;;; After Build
1101             [CheckSelfDependency]
1102              
1103             [Run::AfterBuild / .ackrc]
1104             :version = 0.038
1105             quiet = 1
1106             run = bash -c "test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi"
1107             [Run::AfterBuild / .latest]
1108             :version = 0.041
1109             quiet = 1
1110             fatal_errors = 0
1111             eval = if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }
1112              
1113              
1114             ;;; Before Release
1115             [CheckStrictVersion]
1116             decimal_only = 1
1117              
1118             [CheckMetaResources]
1119             [EnsureLatestPerl]
1120              
1121             [Git::Check / initial check]
1122             allow_dirty =
1123              
1124             [Git::CheckFor::MergeConflicts]
1125              
1126             [Git::CheckFor::CorrectBranch]
1127             :version = 0.004
1128             release_branch = master
1129              
1130             [Git::Remote::Check]
1131             branch = master
1132             remote_branch = master
1133              
1134             [CheckPrereqsIndexed]
1135             :version = 0.019
1136             [TestRelease]
1137             [Git::Check / after tests]
1138             allow_dirty =
1139             [CheckIssues]
1140             ;(ConfirmRelease)
1141              
1142              
1143             ;;; Releaser
1144             [UploadToCPAN]
1145              
1146              
1147             ;;; AfterRelease
1148             [Run::AfterRelease / remove old LICENCE] ; if switching from LICENCE -> LICENSE
1149             :version = 0.038
1150             quiet = 1
1151             eval = unlink 'LICENCE'
1152              
1153             [Run::AfterRelease / remove old LICENSE] ; if switching from LICENSE -> LICENCE
1154             :version = 0.038
1155             quiet = 1
1156             eval = unlink 'LICENSE'
1157              
1158             [Run::AfterRelease / remove old READMEs]
1159             :version = 0.038
1160             quiet = 1
1161             eval = unlink 'README.md'
1162              
1163             [CopyFilesFromRelease / copy generated files]
1164             filename = CONTRIBUTING
1165             filename = INSTALL
1166             filename = LICENCE
1167             filename = LICENSE
1168             filename = ppport.h
1169              
1170             [ReadmeAnyFromPod]
1171             :version = 0.142180
1172             type = pod
1173             location = root
1174             phase = release
1175              
1176             ;;;;;; begin [@Git::VersionManager]
1177              
1178             ; this is actually a VersionProvider and FileMunger
1179             [RewriteVersion::Transitional]
1180             :version = 0.004
1181             global = 1
1182             fallback_version_provider = Git::NextVersion
1183             version_regexp = ^v([\d._]+)(-TRIAL)?$
1184              
1185             [CopyFilesFromRelease / copy Changes]
1186             filename = Changes
1187              
1188             [Git::Commit / release snapshot]
1189             :version = 2.020
1190             add_files_in = .
1191             allow_dirty = CONTRIBUTING
1192             allow_dirty = Changes
1193             allow_dirty = INSTALL
1194             allow_dirty = LICENCE
1195             allow_dirty = LICENSE
1196             allow_dirty = README.md
1197             allow_dirty = README.pod
1198             allow_dirty = ppport.h
1199             commit_msg = %N-%v%t%n%n%c
1200              
1201             [Git::Tag]
1202             tag_message = v%v%t
1203              
1204             [BumpVersionAfterRelease::Transitional]
1205             :version = 0.004
1206             global = 1
1207              
1208             [NextRelease]
1209             :version = 5.033
1210             time_zone = UTC
1211             format = %-8v %{yyyy-MM-dd HH:mm:ss'Z'}d%{ (TRIAL RELEASE)}T
1212              
1213             [Git::Commit / post-release commit]
1214             :version = 2.020
1215             allow_dirty = Changes
1216             allow_dirty_match = ^lib/.*\.pm$
1217             commit_msg = increment $VERSION after %v release
1218              
1219             ;;;;;; end [@Git::VersionManager]
1220              
1221             [Git::Push]
1222              
1223             [GitHub::Update] ; (if server = 'github' or omitted)
1224             :version = 0.40
1225             metacpan = 1
1226              
1227             [Run::AfterRelease / install release]
1228             :version = 0.031
1229             fatal_errors = 0
1230             run = cpanm http://URMOM:mysekritpassword@pause.perl.org/pub/PAUSE/authors/id/U/UR/URMOM/%a
1231              
1232             [Run::AfterRelease / release complete]
1233             :version = 0.038
1234             quiet = 1
1235             eval = print "release complete!\xa"
1236              
1237             ; listed late, to allow all other plugins which do BeforeRelease checks to run first.
1238             [ConfirmRelease]
1239              
1240             ; listed last, to be sure we run at the very end of each phase
1241             ; only performed if $ENV{USER} matches /^tabulo$/
1242             [VerifyPhases / PHASE VERIFICATION]
1243             :version = 0.015
1244              
1245             =for Pod::Coverage configure mvp_multivalue_args
1246              
1247             =for stopwords metacpan
1248              
1249             The distribution's code is assumed to be hosted at L<github|http://github.com>;
1250             L<RT|http://rt.cpan.org> is used as the issue tracker.
1251             The home page in the metadata points to L<github|http://github.com>,
1252             while the home page on L<github|http://github.com> is updated on release to
1253             point to L<metacpan|http://metacpan.org>.
1254             The version and other metadata is derived directly from the local git repository.
1255              
1256             =head1 OPTIONS / OVERRIDES
1257              
1258             =head2 version
1259              
1260             Use C<< V=<version> >> in the shell to override the version of the distribution being built;
1261             otherwise the version is incremented after each release, in the F<*.pm> files.
1262              
1263             =head2 pod coverage
1264              
1265             Subroutines can be considered "covered" for pod coverage tests by adding a
1266             directive to pod (as many as you'd like),
1267             as described in L<Pod::Coverage::TrustPod>:
1268              
1269             =for Pod::Coverage foo bar baz
1270              
1271             =head2 spelling stopwords
1272              
1273             =for stopwords Stopwords foo bar baz
1274              
1275             Stopwords for spelling tests can be added by adding a directive to pod (as
1276             many as you'd like), as described in L<Pod::Spell/ADDING STOPWORDS>:
1277              
1278             =for stopwords foo bar baz
1279              
1280             It is also possible to use the [%PodWeaver] stash in 'dist.ini' to add stopwords, like so :
1281             [%PodWeaver]
1282             -StopWords.include = foo bar baz
1283              
1284             Such words will be recognized by the C<[StopWords]|Pod::Weaver::Plugin::StopWords> plugin for C<Pod::Weaver>,
1285             which will gather them at the top of your POD (since we set its 'gather' parameter).
1286              
1287             See also L<[Test::PodSpelling]|Dist::Zilla::Plugin::Test::PodSpelling/stopwords>.
1288              
1289             =head2 installer
1290              
1291             =for stopwords ModuleBuildTiny
1292              
1293             Available since 0.007.
1294              
1295             The installer back-end(s) to use (can be specified more than once); defaults
1296             to L<C<ModuleBuildTiny::Fallback>|Dist::Zilla::Plugin::ModuleBuildTiny::Fallback>
1297             and L<C<MakeMaker::Fallback>|Dist::Zilla::Plugin::MakeMaker::Fallback>
1298             (which generates a F<Build.PL> for normal use with no-configure-requires
1299             protection, and F<Makefile.PL> as a fallback, containing an upgrade warning).
1300             For toolchain-grade modules, you should only use F<Makefile.PL>-generating installers.
1301              
1302             You can select other backends (by plugin name, without the C<[]>), with the
1303             C<installer> option, or C<none> if you are supplying your own, as a separate
1304             plugin(s).
1305              
1306             Encouraged choices are:
1307              
1308             =over 4
1309              
1310             =item *
1311              
1312             C<< installer = ModuleBuildTiny >>
1313              
1314             =item *
1315              
1316             C<< installer = MakeMaker >>
1317              
1318             =item *
1319              
1320             C<< installer = MakeMaker::Fallback >> (when used in combination with ModuleBuildTiny)
1321              
1322             =item *
1323              
1324             C<< installer = =inc::Foo >> (if no configs are needed for this plugin; e.g. subclassed from L<[MakeMaker::Awesome]|Dist::Zilla::Plugin::MakeMaker::Awesome>)
1325              
1326             =item *
1327              
1328             C<< installer = none >> (if you are providing your own elsewhere in the file, with configs)
1329              
1330             =back
1331              
1332             =head2 server
1333              
1334             Available since 0.019.
1335              
1336             If provided, must be one of:
1337              
1338             =over 4
1339              
1340             =item *
1341              
1342             C<github>
1343              
1344             (default)
1345             metadata and release plugins are tailored to L<github|http://github.com>.
1346              
1347             =item *
1348              
1349             C<gitmo>
1350              
1351             metadata and release plugins are tailored to
1352             L<gitmo@git.moose.perl.org|http://git.moose.perl.org>.
1353              
1354             =item *
1355              
1356             C<p5sagit>
1357              
1358             metadata and release plugins are tailored to
1359             L<p5sagit@git.shadowcat.co.uk|http://git.shadowcat.co.uk>.
1360              
1361             =item *
1362              
1363             C<catagits>
1364              
1365             metadata and release plugins are tailored to
1366             L<catagits@git.shadowcat.co.uk|http://git.shadowcat.co.uk>.
1367              
1368             =item *
1369              
1370             C<none>
1371              
1372             no special configuration of metadata (relating to repositories etc) is done --
1373             you'll need to provide this yourself.
1374              
1375             =back
1376              
1377             =head2 airplane
1378              
1379             Available since 0.053.
1380              
1381             A boolean option that, when set, removes the use of all plugins that use the
1382             network (generally for comparing metadata against PAUSE, and querying the
1383             remote git server), as well as blocking the use of the C<release> command.
1384             Defaults to false; can also be set with the environment variable C<DZIL_AIRPLANE>.
1385              
1386             =head2 copy_file_from_release
1387              
1388             Available in this form since 0.076.
1389              
1390             A file, to be present in the build, which is copied back to the source
1391             repository at release time and committed to git. Can be used more than
1392             once. Defaults to:
1393             F<LICENCE>, F<LICENSE>, F<CONTRIBUTING>, F<Changes>, F<ppport.h>, F<INSTALL>;
1394             defaults are appended to, rather than overwritten.
1395              
1396             =head2 surgical_podweaver
1397              
1398             =for stopwords PodWeaver SurgicalPodWeaver
1399              
1400             Available since 0.051.
1401              
1402             A boolean option that, when set, uses
1403             L<[SurgicalPodWeaver]|Dist::Zilla::Plugin::SurgicalPodWeaver> instead of
1404             L<[PodWeaver]|Dist::Zilla::Plugin::SurgicalPodWeaver>, but with all the same
1405             options. Defaults to false.
1406              
1407             =head2 changes_version_columns
1408              
1409             Available since 0.076.
1410              
1411             An integer that specifies how many columns (right-padded with whitespace) are
1412             allocated in F<Changes> entries to the version string. Defaults to 10 in general (and 12 for TABULO).
1413              
1414             =head2 licence (or license)
1415              
1416             Available since 0.101.
1417              
1418             A string that specifies the name to use for the license file. Defaults to
1419             C<LICENCE> for distributions where ETHER or any other known authors who prefer
1420             C<LICENCE> have first-come permissions, or C<LICENSE> otherwise.
1421             (The pod section for legal information is also adjusted appropriately.)
1422              
1423             =head2 authority
1424              
1425             Available since 0.117.
1426              
1427             A string of the form C<cpan:PAUSEID> that references the PAUSE ID of the user who has primary ("first-come")
1428             authority over the distribution and main module namespace. If not provided, it is extracted from the configuration
1429             passed through to the L<[Authority]|Dist::Zilla::Plugin::Authority> plugin, and finally defaults to C<cpan:TABULO>.
1430             It is presently used for setting C<x_authority> metadata and deciding which spelling is used for the F<LICENCE>
1431             file (if the C<licence> configuration is not provided).
1432              
1433             =head2 fake_release
1434              
1435             =for stopwords UploadToCPAN FakeRelease
1436              
1437             Available since 0.122.
1438              
1439             A boolean option that, when set, removes L<[UploadToCPAN]|Dist::Zilla::Plugin::UploadToCPAN> from the plugin list
1440             and replaces it with L<[FakeRelease]|Dist::Zilla::Plugin::FakeRelease>.
1441             Defaults to false; can also be set with the environment variable C<FAKE_RELEASE>.
1442              
1443             =for stopwords customization
1444              
1445             =head2 other customization options
1446              
1447             This bundle makes use of L<Dist::Zilla::Role::PluginBundle::PluginRemover> and
1448             L<Dist::Zilla::Role::PluginBundle::Config::Slicer> to allow further customization.
1449             (Note that even though some overridden values are inspected in this class,
1450             they are still overlaid on top of whatever this bundle eventually decides to
1451             pass - so what is in the F<dist.ini> always trumps everything else.)
1452              
1453             Plugins are not loaded until they are actually needed, so it is possible to
1454             C<--force>-install this plugin bundle and C<-remove> some plugins that do not
1455             install or are otherwise problematic.
1456              
1457             If a F<weaver.ini> is present in the distribution, pod is woven using it;
1458             otherwise, the behaviour is as with a F<weaver.ini> containing the single line
1459             C<[@Author::TABULO]> (see L<Pod::Weaver::PluginBundle::Author::TABULO>).
1460              
1461             =head1 NAMING SCHEME
1462              
1463             =for stopwords KENTNL
1464              
1465             This distribution follows best practices for author-oriented plugin bundles; for more information,
1466             see L<KENTNL's distribution|Dist::Zilla::PluginBundle::Author::KENTNL/NAMING-SCHEME>.
1467              
1468             =head1 ORIGINAL AUTHOR
1469              
1470             This distribution is based on L<Dist::Zilla::PluginBundle::Author::ETHER> by :
1471              
1472             Karen Etheridge L<cpan:ETHER>
1473              
1474             Thank you ETHER!
1475              
1476             =head1 SEE ALSO
1477              
1478             =over 4
1479              
1480             =item *
1481              
1482             L<Pod::Weaver::PluginBundle::Author::TABULO>
1483              
1484             =item *
1485              
1486             L<Dist::Zilla::MintingProfile::Author::TABULO>
1487              
1488             =item *
1489              
1490             L<Dist::Zilla::PluginBundle::Git::VersionManager>
1491              
1492             =item *
1493              
1494             L<Dist::Zilla::PluginBundle::Author::ETHER> (original bundle by ETHER)
1495              
1496             =back
1497              
1498             =head1 SUPPORT
1499              
1500             Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-PluginBundle-Author-TABULO>
1501             (or L<bug-Dist-Zilla-PluginBundle-Author-TABULO@rt.cpan.org|mailto:bug-Dist-Zilla-PluginBundle-Author-TABULO@rt.cpan.org>).
1502              
1503             =head1 AUTHOR
1504              
1505             Tabulo <tabulo@cpan.org>
1506              
1507             =head1 CONTRIBUTORS
1508              
1509             =for stopwords Karen Etheridge Edward Betts Graham Knop Randy Stauner Roy Ivy III Сергей Романов Dave Rolsky
1510              
1511             =over 4
1512              
1513             =item *
1514              
1515             Karen Etheridge <ether@cpan.org>
1516              
1517             =item *
1518              
1519             Edward Betts <edward@4angle.com>
1520              
1521             =item *
1522              
1523             Graham Knop <haarg@haarg.org>
1524              
1525             =item *
1526              
1527             Randy Stauner <rwstauner@cpan.org>
1528              
1529             =item *
1530              
1531             Roy Ivy III <rivy@cpan.org>
1532              
1533             =item *
1534              
1535             Сергей Романов <sromanov@cpan.org>
1536              
1537             =item *
1538              
1539             Dave Rolsky <autarch@urth.org>
1540              
1541             =back
1542              
1543             =head1 COPYRIGHT AND LICENSE
1544              
1545             This software is copyright (c) 2018 by Tabulo.
1546              
1547             This is free software; you can redistribute it and/or modify it under
1548             the same terms as the Perl 5 programming language system itself.
1549              
1550             =cut
1551              
1552             __END__
1553              
1554             #region pod
1555              
1556              
1557             #endregion pod