summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-02-12 14:48:42 -0600
committerJesse Luehrs <doy@tozt.net>2012-02-12 14:48:42 -0600
commit7e03ac21953463f1ef8f5d0d96c8e76d19111ef8 (patch)
treee0d885a933a7c42ed1c907cace5fe74d55f951ed
parent16b87d762a73fc560f14b43575a6ef8ba9127de4 (diff)
downloaddist-zilla-pluginbundle-doy-7e03ac21953463f1ef8f5d0d96c8e76d19111ef8.tar.gz
dist-zilla-pluginbundle-doy-7e03ac21953463f1ef8f5d0d96c8e76d19111ef8.zip
allow specifying dynamic_config in dist.ini
-rw-r--r--dist.ini1
-rw-r--r--lib/Dist/Zilla/PluginBundle/DOY.pm10
2 files changed, 11 insertions, 0 deletions
diff --git a/dist.ini b/dist.ini
index cf4d335..a8ff915 100644
--- a/dist.ini
+++ b/dist.ini
@@ -12,6 +12,7 @@ Dist::Zilla::Plugin::Test::Compile = 0
Dist::Zilla::Plugin::EOLTests = 0
Dist::Zilla::Plugin::Git = 1.102810
Dist::Zilla::Plugin::MakeMaker::Awesome = 0
+Dist::Zilla::Plugin::Metadata = 0
Dist::Zilla::Plugin::NoTabsTests = 0
Dist::Zilla::Plugin::PodWeaver = 0
Dist::Zilla::Plugin::Repository = 0.16
diff --git a/lib/Dist/Zilla/PluginBundle/DOY.pm b/lib/Dist/Zilla/PluginBundle/DOY.pm
index e0bcf5c..82ffa9c 100644
--- a/lib/Dist/Zilla/PluginBundle/DOY.pm
+++ b/lib/Dist/Zilla/PluginBundle/DOY.pm
@@ -67,6 +67,11 @@ has awesome => (
isa => 'Str',
);
+has dynamic_config => (
+ is => 'ro',
+ isa => 'Str',
+);
+
has is_task => (
is => 'ro',
isa => 'Bool',
@@ -134,6 +139,7 @@ has _plugins => (
EOLTests
Test::Compile
Repository
+ Metadata
Git::Check
Git::Commit
Git::Tag
@@ -169,6 +175,10 @@ has plugin_options => (
},
);
+ $opts{Metadata} = {
+ dynamic_config => 1,
+ } if $self->dynamic_config;
+
for my $option (keys %{ $self->payload }) {
next unless $option =~ /^([A-Z][^_]*)_(.+)$/;
my ($plugin, $plugin_option) = ($1, $2);