File Coverage

blib/lib/Dist/Zilla/Config/Slicer.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 28 28 100.0


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   519 use strict;
  3         2  
  3         76  
11 3     3   8 use warnings;
  3         3  
  3         111  
12              
13             package Dist::Zilla::Config::Slicer;
14             # git description: v0.200-6-g8420185
15              
16             our $AUTHORITY = 'cpan:RWSTAUNER';
17             # ABSTRACT: Config::MVP::Slicer customized for Dist::Zilla
18             $Dist::Zilla::Config::Slicer::VERSION = '0.201';
19 3     3   1118 use Config::MVP::Slicer ();
  3         555272  
  3         100  
20 3     3   439 use Dist::Zilla::Util 4 ();
  3         7872  
  3         44  
21 3     3   10 use Moose;
  3         3  
  3         19  
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   8881 return sub { Dist::Zilla::Util->expand_config_package_name($_[0]) eq $_[1] };
  15     15   346  
28             }
29              
30 3     3   12590 no Moose;
  3         6  
  3         12  
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.201
50              
51             =head1 SYNOPSIS
52              
53             my $slicer = Dist::Zilla::Config::Slicer->new({
54             config => $section->{payload},
55             });
56              
57             $slicer->merge($plugin);
58              
59             =head1 DESCRIPTION
60              
61             This is a subclass of L<Config::MVP::Slicer>
62             that overrides the default
63             L<match_package|Config::MVP::Slicer/match_package>
64             to expand packages according to L<Dist::Zilla>'s rules.
65              
66             =for test_synopsis my ($section, $plugin);
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