Skip to content

Instantly share code, notes, and snippets.

@timlegge
Created March 21, 2020 12:28
Show Gist options
  • Select an option

  • Save timlegge/5069503e97d04e85bd13ae1329ee75e7 to your computer and use it in GitHub Desktop.

Select an option

Save timlegge/5069503e97d04e85bd13ae1329ee75e7 to your computer and use it in GitHub Desktop.
my $mc = MetaCPAN::Client->new;
my $query = {
all => [
{ provides => $module },
{ status => 'latest' },
]
};
my $results = $mc->release($query, { fields =>
[qw/ name download_url abstract distribution version /] });
if ($results->total == 0) {
die "Unable to find module named $module\n";
}
my $moddata = $results->next;
my $apkname = map_cpan_to_apk( $moddata->distribution);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment