File Coverage

blib/lib/Dist/Zilla/Config/Slicer.pm
Criterion Covered Total %
statement 8 10 80.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 12 14 85.7


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 1     1   423 use strict;
  1         1  
  1         29  
11 1     1   3 use warnings;
  1         2  
  1         46  
12              
13             package Dist::Zilla::Config::Slicer;
14             {
15             $Dist::Zilla::Config::Slicer::VERSION = '0.200';
16             }
17             BEGIN {
18 1     1   11 $Dist::Zilla::Config::Slicer::AUTHORITY = 'cpan:RWSTAUNER';
19             }
20             # ABSTRACT: Config::MVP::Slicer customized for Dist::Zilla
21              
22 1     1   163 use Config::MVP::Slicer ();
  0            
  0            
23             use Dist::Zilla::Util 4 ();
24             use Moose;
25              
26             extends 'Config::MVP::Slicer';
27              
28             sub _build_match_package {
29             # NOTE: Dist::Zilla::Util 4.3 claims this method "is likely to change go away"
30             return sub { Dist::Zilla::Util->expand_config_package_name($_[0]) eq $_[1] };
31             }
32              
33             no Moose;
34             __PACKAGE__->meta->make_immutable;
35             1;
36              
37              
38             __END__
39             =pod
40              
41             =for :stopwords Randy Stauner ACKNOWLEDGEMENTS cpan testmatrix url annocpan anno bugtracker
42             rt cpants kwalitee diff irc mailto metadata placeholders metacpan
43              
44             =encoding utf-8
45              
46             =head1 NAME
47              
48             Dist::Zilla::Config::Slicer - Config::MVP::Slicer customized for Dist::Zilla
49              
50             =head1 VERSION
51              
52             version 0.200
53              
54             =head1 SYNOPSIS
55              
56             my $slicer = Dist::Zilla::Config::Slicer->new({
57             config => $section->{payload},
58             });
59              
60             $slicer->merge($plugin);
61              
62             =head1 DESCRIPTION
63              
64             This is a subclass of L<Config::MVP::Slicer>
65             that overrides the default
66             L<match_package|Config::MVP::Slicer/match_package>
67             to expand packages according to L<Dist::Zilla>'s rules.
68              
69             =for test_synopsis my ($section, $plugin);
70              
71             =head1 SEE ALSO
72              
73             =over 4
74              
75             =item *
76              
77             L<Config::MVP::Slicer>
78              
79             =item *
80              
81             L<Dist::Zilla::Role::PluginBundle::Config::Slicer>
82              
83             A role to consume in your own C<PluginBundle>
84             to automatically enable config slicing.
85              
86             =item *
87              
88             L<Dist::Zilla::PluginBundle::ConfigSlicer>
89              
90             A C<PluginBundle> that combines L<< @Filter|Dist::Zilla::PluginBundle::Filter >>
91             with L<Dist::Zilla::Role::PluginBundle::Config::Slicer|Dist::Zilla::Role::PluginBundle::Config::Slicer>
92             so you can override the configuration for a bundle
93             that doesn't have config slicing built in.
94              
95             =back
96              
97             =head1 SUPPORT
98              
99             =head2 Perldoc
100              
101             You can find documentation for this module with the perldoc command.
102              
103             perldoc Dist::Zilla::Config::Slicer
104              
105             =head2 Websites
106              
107             The following websites have more information about this module, and may be of help to you. As always,
108             in addition to those websites please use your favorite search engine to discover more resources.
109              
110             =over 4
111              
112             =item *
113              
114             Search CPAN
115              
116             The default CPAN search engine, useful to view POD in HTML format.
117              
118             L<http://search.cpan.org/dist/Dist-Zilla-Config-Slicer>
119              
120             =item *
121              
122             RT: CPAN's Bug Tracker
123              
124             The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
125              
126             L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dist-Zilla-Config-Slicer>
127              
128             =item *
129              
130             CPAN Ratings
131              
132             The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
133              
134             L<http://cpanratings.perl.org/d/Dist-Zilla-Config-Slicer>
135              
136             =item *
137              
138             CPAN Testers
139              
140             The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions.
141              
142             L<http://www.cpantesters.org/distro/D/Dist-Zilla-Config-Slicer>
143              
144             =item *
145              
146             CPAN Testers Matrix
147              
148             The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
149              
150             L<http://matrix.cpantesters.org/?dist=Dist-Zilla-Config-Slicer>
151              
152             =item *
153              
154             CPAN Testers Dependencies
155              
156             The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
157              
158             L<http://deps.cpantesters.org/?module=Dist::Zilla::Config::Slicer>
159              
160             =back
161              
162             =head2 Bugs / Feature Requests
163              
164             Please report any bugs or feature requests by email to C<bug-dist-zilla-config-slicer at rt.cpan.org>, or through
165             the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dist-Zilla-Config-Slicer>. You will be automatically notified of any
166             progress on the request by the system.
167              
168             =head2 Source Code
169              
170              
171             L<https://github.com/rwstauner/Dist-Zilla-Config-Slicer>
172              
173             git clone https://github.com/rwstauner/Dist-Zilla-Config-Slicer.git
174              
175             =head1 AUTHOR
176              
177             Randy Stauner <rwstauner@cpan.org>
178              
179             =head1 COPYRIGHT AND LICENSE
180              
181             This software is copyright (c) 2011 by Randy Stauner.
182              
183             This is free software; you can redistribute it and/or modify it under
184             the same terms as the Perl 5 programming language system itself.
185              
186             =cut
187