set default authority to cpan:CCM
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sat, 26 Nov 2016 07:08:11 +0000 (00:08 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sat, 26 Nov 2016 07:08:11 +0000 (00:08 -0700)
lib/Dist/Zilla/PluginBundle/Author/CCM.pm

index 58fc17dccb20ebd3b739b33e47beb0003b604fda..a64c1a590303e9a91ce9b9233c496ebe9a7a4726 100644 (file)
@@ -124,6 +124,22 @@ use Dist::Zilla::Util;
 use Moose;
 use namespace::autoclean;
 
+=attr authority
+
+Specify the release authority. Defaults to C<cpan:CCM>.
+
+=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]}],
This page took 0.025203 seconds and 4 git commands to generate.