line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# vim: set ts=2 sts=2 sw=2 expandtab smarttab: |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# This file is part of Dist-Zilla-Config-Slicer |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# This software is copyright (c) 2011 by Randy Stauner. |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it under |
8
|
|
|
|
|
|
|
# the same terms as the Perl 5 programming language system itself. |
9
|
|
|
|
|
|
|
# |
10
|
3
|
|
|
3
|
|
384
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
81
|
|
11
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
143
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Dist::Zilla::Config::Slicer; |
14
|
|
|
|
|
|
|
# git description: v0.201-0-g2f5999f |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:RWSTAUNER'; |
17
|
|
|
|
|
|
|
# ABSTRACT: Config::MVP::Slicer customized for Dist::Zilla |
18
|
|
|
|
|
|
|
$Dist::Zilla::Config::Slicer::VERSION = '0.202'; |
19
|
3
|
|
|
3
|
|
833
|
use Config::MVP::Slicer (); |
|
3
|
|
|
|
|
730198
|
|
|
3
|
|
|
|
|
165
|
|
20
|
3
|
|
|
3
|
|
444
|
use Dist::Zilla::Util 4 (); |
|
3
|
|
|
|
|
13389
|
|
|
3
|
|
|
|
|
71
|
|
21
|
3
|
|
|
3
|
|
19
|
use Moose; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
27
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
extends 'Config::MVP::Slicer'; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _build_match_package { |
26
|
|
|
|
|
|
|
# NOTE: Dist::Zilla::Util 4.3 claims this method "is likely to change go away" |
27
|
43
|
|
|
43
|
|
9704
|
return sub { Dist::Zilla::Util->expand_config_package_name($_[0]) eq $_[1] }; |
|
15
|
|
|
15
|
|
361
|
|
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
3
|
|
|
3
|
|
22790
|
no Moose; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
19
|
|
31
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=pod |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=encoding UTF-8 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=for :stopwords Randy Stauner ACKNOWLEDGEMENTS cpan testmatrix url annocpan anno bugtracker |
41
|
|
|
|
|
|
|
rt cpants kwalitee diff irc mailto metadata placeholders metacpan |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Dist::Zilla::Config::Slicer - Config::MVP::Slicer customized for Dist::Zilla |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 VERSION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
version 0.202 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=for test_synopsis my ($section, $plugin); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SYNOPSIS |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
my $slicer = Dist::Zilla::Config::Slicer->new({ |
56
|
|
|
|
|
|
|
config => $section->{payload}, |
57
|
|
|
|
|
|
|
}); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
$slicer->merge($plugin); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 DESCRIPTION |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This is a subclass of L<Config::MVP::Slicer> |
64
|
|
|
|
|
|
|
that overrides the default |
65
|
|
|
|
|
|
|
L<match_package|Config::MVP::Slicer/match_package> |
66
|
|
|
|
|
|
|
to expand packages according to L<Dist::Zilla>'s rules. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 SEE ALSO |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=over 4 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item * |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
L<Config::MVP::Slicer> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item * |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L<Dist::Zilla::Role::PluginBundle::Config::Slicer> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
A role to consume in your own C<PluginBundle> |
81
|
|
|
|
|
|
|
to automatically enable config slicing. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item * |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
L<Dist::Zilla::PluginBundle::ConfigSlicer> |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
A C<PluginBundle> that combines L<< @Filter|Dist::Zilla::PluginBundle::Filter >> |
88
|
|
|
|
|
|
|
with L<Dist::Zilla::Role::PluginBundle::Config::Slicer|Dist::Zilla::Role::PluginBundle::Config::Slicer> |
89
|
|
|
|
|
|
|
so you can override the configuration for a bundle |
90
|
|
|
|
|
|
|
that doesn't have config slicing built in. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=back |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 SUPPORT |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 Perldoc |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
perldoc Dist::Zilla::Config::Slicer |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 Websites |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The following websites have more information about this module, and may be of help to you. As always, |
105
|
|
|
|
|
|
|
in addition to those websites please use your favorite search engine to discover more resources. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=over 4 |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item * |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
MetaCPAN |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
A modern, open-source CPAN search engine, useful to view POD in HTML format. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
L<http://metacpan.org/release/Dist-Zilla-Config-Slicer> |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=back |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head2 Bugs / Feature Requests |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Please report any bugs or feature requests by email to C<bug-dist-zilla-config-slicer at rt.cpan.org>, or through |
122
|
|
|
|
|
|
|
the web interface at L<https://rt.cpan.org/Public/Bug/Report.html?Queue=Dist-Zilla-Config-Slicer>. You will be automatically notified of any |
123
|
|
|
|
|
|
|
progress on the request by the system. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head2 Source Code |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
L<https://github.com/rwstauner/Dist-Zilla-Config-Slicer> |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
git clone https://github.com/rwstauner/Dist-Zilla-Config-Slicer.git |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head1 AUTHOR |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Randy Stauner <rwstauner@cpan.org> |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
This software is copyright (c) 2011 by Randy Stauner. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
141
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=cut |