From 7e03ac21953463f1ef8f5d0d96c8e76d19111ef8 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 12 Feb 2012 14:48:42 -0600 Subject: allow specifying dynamic_config in dist.ini --- dist.ini | 1 + lib/Dist/Zilla/PluginBundle/DOY.pm | 10 ++++++++++ 2 files changed, 11 insertions(+) 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); -- cgit v1.2.3-54-g00ecf