---
name: "Menlo::Index::MetaCPAN"
section: "3pm"
platform: "linux"
package: "libmenlo-perl"
version: "1.9019-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Menlo::Index::MetaCPAN"
---

# Menlo::Index::MetaCPAN(3pm)

Search index via MetaCPAN

## NAME

Menlo::Index::MetaCPAN - Search index via MetaCPAN

## 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

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.
