Skip to content

Grinnz/cpan-meta-browser

Repository files navigation

NAME

CPAN Meta Browser

DESCRIPTION

CPAN Meta Browser is a two-part application for convenient access to metadata for the CPAN (Comprehensive Perl Archive Network). The first part is a refresh command which will download this metadata and index it into the selected backend database. The second part is a web application which provides search functionality into the indexed database.

/path/to/cpan-meta-browser.pl refresh
hypnotoad /path/to/cpan-meta-browser.pl

The Module Index Search searches the CPAN packages index, which is the file 02packages.details.txt. This is the canonical mapping of module name to the latest authorized stable release of that module, maintained by PAUSE and used by CPAN installers when given a module to install.

The Permissions Search searches the PAUSE permissions database, which is the file 06perms.txt. This is the listing of authors that can upload new stable releases of a module and have it indexed, and that can modify the permissions for that module name. The first-come permission, granted to the first user to upload a module name, has ultimate authority on the name, and can add or remove any other user's permissions. The permission manager permission can add or remove other co-maint permissions. The co-maint permission can only remove their own permission. Note that these module permissions are not hierarchical. An author must have permissions for each individual module name they wish to have indexed.

The Author Search searches the CPAN authors database, which is the file 00whois.xml. This contains public details of the PAUSE accounts.

INSTALLATION

Perl v5.20.0 or higher is required. Perl dependencies are listed in cpanfile. They can be installed by running:

cpanm --installdeps .

The dependencies for the desired backend (described below) can be installed via the corresponding optional feature:

cpanm --installdeps --with-feature=pg --with-recommends .

CONFIGURATION

CPAN Meta Browser is configured by the file cpan-meta-browser.conf in the application home directory. The configuration file is a Perl hash. The hypnotoad key will be used to configure Hypnotoad if it is used to start the web application.

There are three backends available for CPAN Meta Browser. The backend can be set as backend in the configuration file, or CPAN_META_BROWSER_BACKEND in the environment.

The default backend is sqlite and requires Mojo::SQLite. sqlite_path may be set to a file path to store the database (must be in a writable directory, defaults to cpan-meta.sqlite in the application home directory).

The pg backend requires Mojo::Pg and a PostgreSQL server running at least version 9.6, with the pg_trgm extension. This is usually packaged in the -contrib package for PostgreSQL and must be installed in the database that will be used:

CREATE EXTENSION pg_trgm;

pg_url must also be set to a database connection URL in the form postgresql://user:password@host:port/database.

The redis backend requires Mojo::Redis and a Redis server running at least version 3.2.0. redis_url may be set to a database connection URL in the form redis://x:auth@host:port/database (defaults to redis://localhost:6379/0).

API

In addition to the browser interface, CPAN Meta Browser provides an API to the contents of the files it indexes. See the API documentation for details.

COPYRIGHT AND LICENSE

This software is Copyright (c) 2017 by Dan Book <[email protected]>.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

Bundled Perl 5 Raptor Copyright (c) 2012, Sebastian Riedel.

Licensed under the CC-SA License, Version 4.0 http://creativecommons.org/licenses/by-sa/4.0.

About

CPAN Meta Browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published