CPAN-Local-Plugin-DistroList

 view release on metacpan or  search on metacpan

lib/CPAN/Local/Plugin/DistroList.pm  view on Meta::CPAN

package CPAN::Local::Plugin::DistroList;
{
  $CPAN::Local::Plugin::DistroList::VERSION = '0.003';
}

# ABSTRACT: Populate a mirror with a list of distributions

use strict;
use warnings;

use Path::Class qw(file dir);
use File::Temp;
use URI;
use Try::Tiny;
use LWP::Simple;
use CPAN::DistnameInfo;

use Moose;
extends 'CPAN::Local::Plugin';
with 'CPAN::Local::Role::Gather';
use namespace::clean -except => 'meta';

has list =>
(
    is        => 'ro',
    isa       => 'Str',
    predicate => 'has_list',
);

has prefix =>
(
    is      => 'ro',
    isa     => 'Str',
    default => '',
);

has uris =>
(
    is         => 'ro',
    isa        => 'ArrayRef',
    lazy_build => 1,
    traits     => ['Array'],
    handles    => { uri_list => 'elements' },
);

has cache =>
(
    is         => 'ro',
    isa        => 'Str',
    lazy_build => 1,
);

has authorid =>
(
    is        => 'ro',
    isa       => 'Str',
    predicate => 'has_authorid',
);

has local =>
(
    is         => 'ro',
    isa        => 'Bool',
);

sub _build_uris
{
    my $self = shift;

    my $prefix = $self->prefix;

    my @uris;

    if ( $self->has_list )



( run in 1.209 second using v1.01-cache-2.11-cpan-39bf76dae61 )