use CPAN::Common::Index::MetaCPAN; $index = CPAN::Common::Index::MetaCPAN->new({ include_dev => 1 }); $index->search_packages({ package => "Moose", version => "1.1" }); $index->search_packages({ package => "Moose", version_range => ">= 1.1, < 2" });
This module implements a CPAN::Common::Index that searches for packages against the MetaCPAN API.
This backend supports searching modules with a version range (as specified in CPAN::Meta::Spec) which is translated into MetaCPAN search query.
There is also a support for dev release search, by passing include_dev parameter to the index object.
include_dev
The result may include an optional field download_uri which suggests a specific mirror URL to download from, which can be backpan.org if the archive was deleted, or cpan.metacpan.org if the release date is within 1 day (because some mirrors might not have synced it yet).
download_uri
backpan.org
cpan.metacpan.org
There is no support for searching packages with a regular expression, nor searching authors.
To install Menlo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Menlo
CPAN shell
perl -MCPAN -e shell install Menlo
For more information on module installation, please visit the detailed CPAN module installation guide.