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