line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
9833
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
11
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
56
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Dist::Zilla::PluginBundle::Author::RWSTAUNER::Minter; |
14
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:RWSTAUNER'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$Dist::Zilla::PluginBundle::Author::RWSTAUNER::Minter::VERSION = '4.213'; |
17
|
1
|
|
|
1
|
|
4
|
use Moose; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
18
|
1
|
|
|
1
|
|
4379
|
use MooseX::AttributeShortcuts; |
|
1
|
|
|
|
|
123974
|
|
|
1
|
|
|
|
|
3
|
|
19
|
1
|
|
|
1
|
|
22965
|
use Git::Wrapper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
20
|
1
|
|
|
1
|
|
4
|
use Data::Section -setup; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
10
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
with qw( |
23
|
|
|
|
|
|
|
Dist::Zilla::Role::PluginBundle::Easy |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has pause_id => ( |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
default => sub { ((ref($_[0]) || $_[0]) =~ /Author::([A-Z]+)/)[0] }, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
has _git => ( |
32
|
|
|
|
|
|
|
is => 'lazy', |
33
|
|
|
|
|
|
|
default => sub { Git::Wrapper->new('.') }, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub git_config { |
37
|
3
|
|
|
3
|
0
|
4
|
my ($self, $key) = @_; |
38
|
3
|
|
|
|
|
98
|
return ($self->_git->config($key))[0]; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
foreach my $attr ( qw( name email ) ){ |
42
|
|
|
|
|
|
|
has "git_$attr" => ( |
43
|
|
|
|
|
|
|
is => 'lazy', |
44
|
|
|
|
|
|
|
default => sub { $_[0]->git_config("user.$attr") }, |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
has github_user => ( |
49
|
|
|
|
|
|
|
is => 'lazy', |
50
|
|
|
|
|
|
|
default => sub { $_[0]->git_config("github.user") }, |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
around bundle_config => sub { |
54
|
|
|
|
|
|
|
my ($orig, $self, @args) = @_; |
55
|
|
|
|
|
|
|
my @plugins = $self->$orig(@args); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
$_->[0] =~ s/.+?\/(:DefaultModuleMaker)/$1/ for @plugins; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
return @plugins; |
61
|
|
|
|
|
|
|
}; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub configure { |
64
|
1
|
|
|
1
|
0
|
4
|
my ($self) = @_; |
65
|
|
|
|
|
|
|
|
66
|
1
|
50
|
|
|
|
36
|
$self->add_plugins( |
67
|
|
|
|
|
|
|
[ TemplateModule => ':DefaultModuleMaker', { template => 'Module.template' } ], |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
[ |
70
|
|
|
|
|
|
|
'Git::Init' => $self->github_user ? { |
71
|
|
|
|
|
|
|
remote => 'origin git@github.com:' . $self->github_user . '/%N.git', |
72
|
|
|
|
|
|
|
config => [ |
73
|
|
|
|
|
|
|
'branch.master.remote origin', |
74
|
|
|
|
|
|
|
'branch.master.merge refs/heads/master', |
75
|
|
|
|
|
|
|
], |
76
|
|
|
|
|
|
|
} : {} |
77
|
|
|
|
|
|
|
], |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
[ |
82
|
|
|
|
|
|
|
'Run::AfterMint' => { |
83
|
|
|
|
|
|
|
run => [ |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
'%x -e "mkdir(shift(@ARGV))" %d%pt', |
87
|
|
|
|
|
|
|
], |
88
|
|
|
|
|
|
|
}, |
89
|
|
|
|
|
|
|
], |
90
|
|
|
|
|
|
|
); |
91
|
|
|
|
|
|
|
|
92
|
1
|
|
|
|
|
135
|
$self->generate_files( $self->merged_section_data ); |
93
|
1
|
|
|
|
|
77
|
$self->generate_mailmap; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
sub generate_files { |
97
|
2
|
|
|
2
|
0
|
1496
|
my ($self, $files) = @_; |
98
|
2
|
|
|
|
|
10
|
while( my ($name, $content) = each %$files ){ |
99
|
6
|
|
|
|
|
302
|
$content = $$content; |
100
|
|
|
|
|
|
|
|
101
|
6
|
|
|
|
|
30
|
$content =~ s/\n+\z//; |
102
|
6
|
|
|
|
|
39
|
$self->add_plugins( |
103
|
|
|
|
|
|
|
[ |
104
|
|
|
|
|
|
|
GenerateFile => "Generate-$name" => { |
105
|
|
|
|
|
|
|
filename => $name, |
106
|
|
|
|
|
|
|
is_template => 1, |
107
|
|
|
|
|
|
|
content => $content, |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
], |
110
|
|
|
|
|
|
|
); |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub generate_mailmap { |
115
|
1
|
|
|
1
|
0
|
2
|
my ($self) = @_; |
116
|
1
|
|
|
|
|
36
|
$self->generate_files({ |
117
|
|
|
|
|
|
|
'.mailmap' => \sprintf '%s <%s@cpan.org> <%s>', |
118
|
|
|
|
|
|
|
$self->git_name, lc($self->pause_id), $self->git_email, |
119
|
|
|
|
|
|
|
}); |
120
|
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
|
122
|
1
|
|
|
1
|
|
848
|
no Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
123
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
124
|
|
|
|
|
|
|
1; |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=pod |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=encoding UTF-8 |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=for :stopwords Randy Stauner ACKNOWLEDGEMENTS RWSTAUNER's PluginBundle |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head1 NAME |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Dist::Zilla::PluginBundle::Author::RWSTAUNER::Minter - RWSTAUNER's Dist::Zilla config for minting |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head1 VERSION |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
version 4.213 |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head1 SYNOPSIS |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
; profile.ini |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
[@Author::RWSTAUNER::Minter] |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head1 DESCRIPTION |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
Configure L<Dist::Zilla> to mint a new dist. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=for Pod::Coverage configure |
151
|
|
|
|
|
|
|
git_config |
152
|
|
|
|
|
|
|
generate_files |
153
|
|
|
|
|
|
|
generate_mailmap |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head1 ROUGHLY EQUIVALENT |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
This bundle is roughly equivalent to the following (generated) F<profile.ini>: |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
[TemplateModule / :DefaultModuleMaker] |
160
|
|
|
|
|
|
|
template = Module.template |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
[Git::Init] |
163
|
|
|
|
|
|
|
config = branch.master.remote origin |
164
|
|
|
|
|
|
|
config = branch.master.merge refs/heads/master |
165
|
|
|
|
|
|
|
remote = origin git@github.com:rwstauner/%N.git |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
[Run::AfterMint] |
168
|
|
|
|
|
|
|
run = %x -e "mkdir(shift(@ARGV))" %d%pt |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
[GenerateFile / Generate-Changes] |
171
|
|
|
|
|
|
|
content = Revision history for {{$dist->name}} |
172
|
|
|
|
|
|
|
content = {{ '{{$NEXT}}' }} |
173
|
|
|
|
|
|
|
content = - Initial release |
174
|
|
|
|
|
|
|
filename = Changes |
175
|
|
|
|
|
|
|
is_template = 1 |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
[GenerateFile / Generate-LICENSE] |
178
|
|
|
|
|
|
|
content = This is free software; you can redistribute it and/or modify it under |
179
|
|
|
|
|
|
|
content = the same terms as the Perl 5 programming language system itself. |
180
|
|
|
|
|
|
|
filename = LICENSE |
181
|
|
|
|
|
|
|
is_template = 1 |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
[GenerateFile / Generate-README.mkdn] |
184
|
|
|
|
|
|
|
content = # NAME |
185
|
|
|
|
|
|
|
content = {{ (my $n = $dist->name) =~ s/-/::/g; $n }} - undef |
186
|
|
|
|
|
|
|
content = # COPYRIGHT AND LICENSE |
187
|
|
|
|
|
|
|
content = This software is copyright (c) {{ (localtime)[5]+1900 }} by {{ $dist->copyright_holder }}. |
188
|
|
|
|
|
|
|
content = This is free software; you can redistribute it and/or modify it under |
189
|
|
|
|
|
|
|
content = the same terms as the Perl 5 programming language system itself. |
190
|
|
|
|
|
|
|
filename = README.mkdn |
191
|
|
|
|
|
|
|
is_template = 1 |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
[GenerateFile / Generate-.gitignore] |
194
|
|
|
|
|
|
|
content = /{{$dist->name}}* |
195
|
|
|
|
|
|
|
content = /.build |
196
|
|
|
|
|
|
|
content = /cover_db/ |
197
|
|
|
|
|
|
|
content = /nytprof* |
198
|
|
|
|
|
|
|
content = /tags |
199
|
|
|
|
|
|
|
filename = .gitignore |
200
|
|
|
|
|
|
|
is_template = 1 |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
[GenerateFile / Generate-dist.ini] |
203
|
|
|
|
|
|
|
content = {{ |
204
|
|
|
|
|
|
|
content = $license = ref $dist->license; |
205
|
|
|
|
|
|
|
content = if ( $license =~ /^Software::License::(.+)$/ ) { |
206
|
|
|
|
|
|
|
content = $license = $1; |
207
|
|
|
|
|
|
|
content = } else { |
208
|
|
|
|
|
|
|
content = $license = "=$license"; |
209
|
|
|
|
|
|
|
content = } |
210
|
|
|
|
|
|
|
content = $authors = join( "\n", map { "author = $_" } @{ $dist->authors } ); |
211
|
|
|
|
|
|
|
content = $copyright_year = (localtime)[5] + 1900; |
212
|
|
|
|
|
|
|
content = ''; |
213
|
|
|
|
|
|
|
content = }}name = {{ $dist->name }} |
214
|
|
|
|
|
|
|
content = {{ $authors }} |
215
|
|
|
|
|
|
|
content = license = {{ $license }} |
216
|
|
|
|
|
|
|
content = copyright_holder = {{ join( ', ', map { (/^(.+) <.+>/)[0] }@{ $dist->authors } ) }} |
217
|
|
|
|
|
|
|
content = copyright_year = {{ $copyright_year }} |
218
|
|
|
|
|
|
|
content = [@Author::RWSTAUNER] |
219
|
|
|
|
|
|
|
filename = dist.ini |
220
|
|
|
|
|
|
|
is_template = 1 |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
[GenerateFile / Generate-.mailmap] |
223
|
|
|
|
|
|
|
content = Randy Stauner <rwstauner@cpan.org> <randy@magnificent-tears.com> |
224
|
|
|
|
|
|
|
filename = .mailmap |
225
|
|
|
|
|
|
|
is_template = 1 |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
=head1 SEE ALSO |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
=over 4 |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
=item * |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
L<Dist::Zilla::MintingProfile::Author::RWSTAUNER> |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
=item * |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
L<Dist::Zilla::Role::PluginBundle::Easy> |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
=back |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
=head1 AUTHOR |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
Randy Stauner <rwstauner@cpan.org> |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
This software is copyright (c) 2010 by Randy Stauner. |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
250
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
=cut |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
__DATA__ |
255
|
|
|
|
|
|
|
__[ .gitignore ]__ |
256
|
|
|
|
|
|
|
/{{$dist->name}}* |
257
|
|
|
|
|
|
|
/.build |
258
|
|
|
|
|
|
|
/cover_db/ |
259
|
|
|
|
|
|
|
/nytprof* |
260
|
|
|
|
|
|
|
/tags |
261
|
|
|
|
|
|
|
__[ dist.ini ]__ |
262
|
|
|
|
|
|
|
{{ |
263
|
|
|
|
|
|
|
$license = ref $dist->license; |
264
|
|
|
|
|
|
|
if ( $license =~ /^Software::License::(.+)$/ ) { |
265
|
|
|
|
|
|
|
$license = $1; |
266
|
|
|
|
|
|
|
} else { |
267
|
|
|
|
|
|
|
$license = "=$license"; |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
$authors = join( "\n", map { "author = $_" } @{ $dist->authors } ); |
271
|
|
|
|
|
|
|
$copyright_year = (localtime)[5] + 1900; |
272
|
|
|
|
|
|
|
''; |
273
|
|
|
|
|
|
|
}}name = {{ $dist->name }} |
274
|
|
|
|
|
|
|
{{ $authors }} |
275
|
|
|
|
|
|
|
license = {{ $license }} |
276
|
|
|
|
|
|
|
copyright_holder = {{ join( ', ', map { (/^(.+) <.+>/)[0] }@{ $dist->authors } ) }} |
277
|
|
|
|
|
|
|
copyright_year = {{ $copyright_year }} |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
[@Author::RWSTAUNER] |
280
|
|
|
|
|
|
|
__[ Changes ]__ |
281
|
|
|
|
|
|
|
Revision history for {{$dist->name}} |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
{{ '{{$NEXT}}' }} |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
- Initial release |
286
|
|
|
|
|
|
|
__[ LICENSE ]__ |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
289
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
__[ README.mkdn ]__ |
292
|
|
|
|
|
|
|
# NAME |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
{{ (my $n = $dist->name) =~ s/-/::/g; $n }} - undef |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
# COPYRIGHT AND LICENSE |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
This software is copyright (c) {{ (localtime)[5]+1900 }} by {{ $dist->copyright_holder }}. |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
301
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
302
|
|
|
|
|
|
|
|