use base 'Bash::Completion::Plugin';
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
use JSON;
use Bash::Completion::Utils qw( command_in_path );
sub should_activate {
my @commands = qw
= $ua->request(
POST 'http://api.metacpan.org/release/_search',
Content => encode_json(
{ size => 1000,
fields => ['distribution'],
sort
al {
my $json = decode_json( $res->content );
$req->candidates('') unless ( $json->{hits} );
my @candidates;
my $exact_match = 0;
for ( @{ $json->{hits}->{hits}
use base 'Bash::Completion::Plugin';
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
use JSON;
use Bash::Completion::Utils qw( command_in_path );
sub should_activate {
my @commands = qw
= $ua->request(
POST 'http://api.metacpan.org/release/_search',
Content => encode_json(
{ size => 1000,
fields => ['distribution'],
sort
al {
my $json = decode_json( $res->content );
$req->candidates('') unless ( $json->{hits} );
my @candidates;
my $exact_match = 0;
for ( @{ $json->{hits}->{hits}