From ed0d6422ffd12219c90bf0dd8261e6217e31b284 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Sat, 26 Nov 2016 00:08:11 -0700 Subject: [PATCH] set default authority to cpan:CCM --- lib/Dist/Zilla/PluginBundle/Author/CCM.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/Dist/Zilla/PluginBundle/Author/CCM.pm b/lib/Dist/Zilla/PluginBundle/Author/CCM.pm index 58fc17d..a64c1a5 100644 --- a/lib/Dist/Zilla/PluginBundle/Author/CCM.pm +++ b/lib/Dist/Zilla/PluginBundle/Author/CCM.pm @@ -124,6 +124,22 @@ use Dist::Zilla::Util; use Moose; use namespace::autoclean; +=attr authority + +Specify the release authority. Defaults to C. + +=cut + +has authority => ( + is => 'ro', + isa => 'Str', + lazy => 1, + default => sub { + my $self = shift; + $self->payload->{'Authority.authority'} // $self->payload->{authority} // 'cpan:CCM'; + }, +); + =attr installer Specify which installer to use, such as: @@ -224,7 +240,7 @@ sub configure { ['Test::ReportPrereqs'], # METADATA - ['Authority' => {do_munging => 0}], + ['Authority' => {authority => $self->authority, do_munging => 0}], ['MetaJSON'], ['MetaYAML'], ['MetaNoIndex' => {directory => [@no_index]}], -- 2.43.0