5.010;
use strict;
use App::Cmd::Setup-command;
use File::HomeDir qw<>;
use File::Temp qw<>;
use JSON qw<>;
use Path::Tiny qw<>;
use Object::AUTHORITY;
my %config;
sub get_tempdir
{
Path::Tiny::->
d_names)[0]),
'config.json',
);
}
sub get_config
{
my $proto = shift;
my $class = ref($proto) || $proto;
unless ($config{$class})
{
$config{$class} =
eval { JSON::->new->decode(scalar $
two different conventions; named arguments:
p5u reprove --release=JSON --version=2.53
Or positional arguments:
p5u reprove JSON 2.53
The first argument is the distribution name or module name; t
::" is used to disambiguate between distribution
and module names; in the case of something like "JSON" which is ambiguous,
use a trailing "::" to force it to be interpreted as a module name.
When gi
::Lib::Testers::VERSION = '0.100';
};
use Moo;
use File::Spec 0 qw< >;
use JSON 0 qw< from_json >;
use LWP::Simple 0 qw< mirror is_success >;
use List::Util 0 qw< maxst
ttp://www.cpantesters.org/distro/%s/%s.json',
substr($self->distro, 0, 1),
$self->distro,
);
my $results_file = path(
$self->cache_dir,
sprintf('%s.json', $self->distro),
);
is_success m
unlink $results_file;
die "Failed to retrieve URI $results_uri\n";
};
my $results = from_json scalar $results_file->slurp;
die "Unexpected non-ARRAY content from $results_uri\n"
unless ref
e;
use Moo;
use App::Prove qw//;
use Class::Load qw/load_class/;
use Carp qw/confess/;
use JSON qw/from_json/;
use File::pushd qw/pushd/;
use File::Temp qw//;
use Module::Info qw//;
use Path::Tiny qw
= $1;
}
}
}
if (defined $args{module} and not defined $args{release})
{
my $d = from_json(get(sprintf('http://api.metacpan.org/v0/module/%s', $args{module})));
$args{release} = $d->{di
= $d->{author};
}
if (defined $args{release} and not defined $args{author})
{
my $d = from_json(get(sprintf('http://api.metacpan.org/v0/release/%s', $args{release})));
$args{author} //= $d->{
0';
};
use Moo; no warnings;
use Types::Standard qw< ArrayRef HashRef Maybe Num Str >;
use JSON qw(from_json);
use LWP::Simple qw(get);
use Object::AUTHORITY;
use constant {
template_website
pan_data => (
is => 'lazy',
isa => HashRef,
);
sub _build_metacpan_data
{
from_json get sprintf __PACKAGE__->template_metacpan_data, uc shift->cpanid
}
has [qw(metacpan_releases me
_json get sprintf __PACKAGE__->template_metacpan_releases, uc shift->cpanid)
->{hits}{hits}
}
]
}
sub _build_metacpan_popular
{
my @plusplus = map $_->{fields}{distribution}, @{
(from_json
ut performance
(because App::Cmd or P5U has already loaded them). These include
L<Class::Load>, L<JSON> and L<Path::Tiny>.
If you need OO, then use L<Moo> (but do it in a workhorse module that's
load
= '0.100';
};
use Moo;
use IO::Uncompress::Gunzip qw< gunzip $GunzipError >;
use JSON 2.00 qw< from_json >;
use LWP::Simple 0 qw< get >;
use match::smart 0 qw< M >;
use
;
use Type::Utils 0 qw< class_type >;
use Types::Standard 0.004 qw< HashRef >;
my $json = JSON::->new->allow_nonref;
sub dist2deb
{
my ($dist) = @_;
"lib".lc($dist)."-perl";
}
use nam
elease/_search?q=author:".
uc($author)."%20AND%20status:latest&fields=name&size=1000";
$res = $json->decode($res);
die "MetaCPAN timed out" if $res->{timed_out};
my $pkgs = $self->debian;
my %
ib::Version::AUTHORITY = 'cpan:TOBYINK';
$P5U::Lib::Version::VERSION = '0.100';
};
use JSON qw< from_json >;
use LWP::Simple qw< get >;
use Module::Info;
use Module::Runtime qw< module_notional_fi
_installed(@_);
}
sub cpan_module_info
{
my $self = shift;
my $mod = shift;
my $data = from_json get(
sprintf
'http://api.metacpan.org/v0/module/_search?q=status:cpan+AND+path:lib/%s&fields
n => $data);
}
sub backpan_module_info
{
my $self = shift;
my $mod = shift;
my $data = from_json get(
sprintf
'http://api.metacpan.org/v0/module/_search?q=status:backpan+AND+path:lib/%s&fie