Menlo::Index::MetaCPAN(3) User Contributed Perl Documentation Menlo::Index::MetaCPAN(3)

# [SYNOPSIS](#SYNOPSIS)

```
  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" });
```

# [DESCRIPTION](#DESCRIPTION)

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.

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).

There is no support for searching packages with a regular expression, nor searching authors.

2026-10-26 perl v5.44.0

---

Document: Menlo::Index::MetaCPAN(3pm) from perl-menlo 1.9019-r7 (Chainguard OS)
Source: https://github.com/miyagawa/cpanminus
