Dist-Zilla-PluginBundle-GitLab

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/GitLab/Meta.pm  view on Meta::CPAN

package Dist::Zilla::Plugin::GitLab::Meta 1.0002;

use Modern::Perl;
use JSON::MaybeXS;
use URL::Encode qw(url_encode_utf8);
use Moose;

extends 'Dist::Zilla::Plugin::GitLab';
with 'Dist::Zilla::Role::MetaProvider';

has bugs => (
   is      => 'ro',
   isa     => 'Bool',
   default => 1,
);

has fork => (
   is      => 'ro',
   isa     => 'Bool',
   default => 1,
);

has wiki => (
   is      => 'ro',
   isa     => 'Bool',
   default => 0,
);

has p3rl => (
   is      => 'ro',
   isa     => 'Bool',
   default => 0,
);

has metacpan => (
   is      => 'ro',
   isa     => 'Bool',
   default => 1,
);

has meta_home => (
   is      => 'ro',
   isa     => 'Bool',
   default => 0,
);

around dump_config => sub {
   my ( $orig, $self ) = @_;
   my $config = $self->$orig;

   my $option = first { $self->$_ } qw(meta_home metacpan p3rl);
   $config->{ +__PACKAGE__ } = { $option => ( $self->$option ? 1 : 0 ), };
   return $config;
};

sub metadata {
   my $self    = shift;
   my $offline = 0;

   my $repo_name = $self->_get_repo_name;
   return {} if ( !$repo_name );
   my $encoded_repo = url_encode_utf8($repo_name);



( run in 1.318 second using v1.01-cache-2.11-cpan-437f7b0c052 )