• Stars
    star
    289
  • Rank 143,419 (Top 3 %)
  • Language
    Perl
  • License
    Other
  • Created about 14 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A free, open API for everything you want to know about CPAN

CircleCI

A Web Service for the CPAN

MetaCPAN aims to provide a free, open web service which provides metadata for CPAN modules.

REST API

MetaCPAN is based on Elasticsearch, so it provides a RESTful interface as well as the option to create complex queries. The docs/ directory provides a good starting point for REST access to MetaCPAN.

Expanding Your Author Info

MetaCPAN allows authors to add custom metadata about themselves to the index. Log in to MetaCPAN to add more information about yourself.

Installing Your Own MetaCPAN:

If you want to run MetaCPAN locally, we encourage you to start with metacpan-docker. However, you may still find some info here:

Troubleshooting Elasticsearch

You can restart Elasticsearch (ES) manually if you need to troubleshoot.

sudo service elasticsearch restart

If you are unable to access [[http://localhost:9200]] (give it a few seconds) you should kill the Elasticsearch process and run it in foreground to see the debug output

sudo service elasticsearch stop
cd /opt/elasticsearch
sudo bin/elasticsearch -f

If you get a "Can't start up: not enough memory" error when trying to start Elasticsearch, you likely need to update your JRE. On Ubuntu:

# fixes "not enough memory" errors
sudo apt-get install openjdk-6-jre

(Note: If you intend to try indexing a full MiniCPAN, you may find that Elasticsearch wants to use more open filehandles than your system allows by default. This script can be used to start ES with the appropriate ulimit adjustment).

Run the test suite

The test suite accesses Elasticsearch on port 9900. The developer VM should have a dedicated test instance running in the background already, but if you want to run it manually:

cd /opt/elasticsearch
sudo bin/elasticsearch -f -Des.http.port=9900 -Des.cluster.name=testing

Then run the test suite:

cd /home/metacpan/metacpan-api
./bin/prove t

The test suite has to pass all tests.

Create the ElasticSearch Index

./bin/run bin/metacpan mapping --delete

--delete will drop all indices first to clear the index from test data.

Begin Indexing Your Modules

./bin/run bin/metacpan release /path/to/cpan/authors/id/

You should note that you can index either your CPAN mirror or a minicpan mirror. You can even index just parts of a mirror:

./bin/run bin/metacpan release /path/to/cpan/authors/id/{A,B}

Tag the Latest Releases

./bin/run bin/metacpan latest --cpan /path/to/cpan/

Index Author Data

./bin/run bin/metacpan author --cpan /path/to/cpan/

Note that minicpan doesn't provide the 00whois.xml file which is used to generate the index; you will have to download it manually (it is in the authors/ directory) in order to index authors.

wget -O /path/to/cpan/authors/00whois.xml cpan.cpantesters.org/authors/00whois.xml

It also doesn't include author.json files, so that data will also be missing unless you get it from somewhere else.

Set Up Proxy in Front of ElasticSearch

Start API server on port 5000

./bin/run plackup -p 5000 -r

This will start a single-threaded test server. If you need extra performance, use Starman instead.

Notes

For a full list of options:

./bin/run bin/metacpan release --help

Contributing:

If you'd like to get involved, find us at #metacpan on irc.perl.org or open an issue on GitHub and let us know what you'd like to start working on.

IRC

You can find us at #metacpan on irc.perl.org Access it via web interface.

More Repositories

1

metacpan-web

Web interface for MetaCPAN
Perl
414
star
2

github-meets-cpan

Shows connections between the MetaCPAN users and their Github accounts
Perl
43
star
3

metacpan-examples

Sample code to get you up and running quickly
Perl
41
star
4

js-metacpan-org

Proof of concept search page for using api.metacpan.org
JavaScript
28
star
5

metacpan-docker

DEVELOPMENT Docker configs for MetaCPAN
Shell
25
star
6

metacpan-puppet

Puppet configuration for running metacpan servers
Ruby
21
star
7

MetaCPAN-Client

Home of the official MetaCPAN Perl API client.
Perl
21
star
8

metacpan-explorer

Interactive explorer for the MetaCPAN API
JavaScript
18
star
9

metacpan-grep-front-end

Grep Front end code
CSS
13
star
10

network-infrastructure

Notes and information about the MetaCPAN networks and infrastructure
JavaScript
12
star
11

metacpan-cpan-extracted

Extracted CPAN (all latest files extracted)
12
star
12

prepan

Perl
11
star
13

CPAN-Changes

Read and write Changes files
Perl
9
star
14

prepan-cookbooks

Ruby
9
star
15

release-badge

A JavaScript badge which displays info on the latest release of a CPAN module.
JavaScript
5
star
16

metacpan-sysadmin

Tools for troubleshooting the production machines
Perl
4
star
17

metacpan-base

Base docker image for metacpan docker images
Shell
3
star
18

metacpan-ansible

NOT USED Ansible deployment configuration
Jinja
3
star
19

metacpan-grep-builder

Experiment on building a git grep service of current CPAN
Perl
3
star
20

logo-vote

Logo contest voting server
Perl
2
star
21

metacpan-assets

Logos etc.
2
star
22

MetaCPAN-Pod-HTML

Perl
2
star
23

p5-CatalystX-Fastly-Role-Response

Add Fastly CDN related responses to your Catalyst App
Perl
1
star
24

metacpan-api-v0-shim

Perl
1
star
25

MetaShare

Replaced with metacpan / p5-metacpan-role
Perl
1
star
26

metacpan-docker-production

Production setup of metacpan docker
Shell
1
star
27

sco-redirect

Perl
1
star
28

metacpan-vagrant

Configure Virtual Development machines for metacpan
Shell
1
star
29

metacpan-monitoring

Monitoring metacpan
Perl
1
star
30

p5-metacpan-websocket

WebSocket interface to MetaCPAN
Perl
1
star
31

metacpan-k8s

Shell
1
star
32

metacpan-cpan-extracted-lite

Used for testing metacpan-cpan-extracted
Perl
1
star