CPAN::Local - Manage your local CPAN mirror
This document describes version 0.01 of CPAN::Local (from Perl distribution CPAN-Local), released on 2015-01-13.
See lcpan script.
List authors in local CPAN.
Examples:
list_local_cpan_authors();
List all authors.
list_local_cpan_authors( query => "MICHAEL%"); # -> ["MICHAEL", "MICHAELW"]
Find CPAN IDs which start with something.
Arguments ('*' denotes required arguments):
cpan => str
Location of your local CPAN mirror, e.g. /path/to/cpan.
Defaults to ~/cpan.
~/cpan
detail => bool
query => str
Search query.
Return value: (any)
By default will return an array of CPAN ID's. If you set detail to true, will return array of records.
detail
List dependencies of a module, data from local CPAN.
include_core => bool (default: 0)
Include Perl core modules.
level => int (default: 1)
Recurse for a number of levels (-1 means unlimited).
module* => str
perl_version => str (default: "v5.18.4")
Set base Perl version for determining core modules.
phase => str (default: "runtime")
rel => str (default: "requires")
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (result) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
List distributions in local CPAN.
list_local_cpan_dists( cpan => "/cpan");
List all distributions.
list_local_cpan_dists( cpan => "/cpan", query => "data-table");
Grep by distribution name, return detailed record.
list_local_cpan_dists();
Filter by author, return JSON.
author => str
Filter by author.
By default will return an array of distribution names. If you set detail to true, will return array of records.
List packages in local CPAN.
dist => str
Filter by distribution.
By default will return an array of package names. If you set detail to true, will return array of records.
List reverse dependencies of a module, data from local CPAN.
max_file_size => int
remote_url => str
This application began as CPAN::SQLite::CPANMeta, an extension of CPAN::SQLite. CPAN::SQLite parses 02packages.details.txt.gz and 01mailrc.txt.gz and puts the parse result into a SQLite database. CPAN::SQLite::CPANMeta parses the META.json/META.yml files in individual release files and adds it to the SQLite database.
CPAN::SQLite
02packages.details.txt.gz
01mailrc.txt.gz
CPAN::SQLite::CPANMeta
META.json
META.yml
In order to simplify things for the users (one-step indexing) and get more freedom in database schema, CPAN::Local skips using CPAN::SQLite and creates the SQLite database itself. It also parses 02packages.details.txt.gz but does not parse distribution names from it but instead uses META.json and META.yml files extracted from the release files.
CPAN::Local
Please visit the project's homepage at https://metacpan.org/release/CPAN-Local.
Source repository is at https://github.com/perlancar/perl-CPAN-Local.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Local
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2015 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install CPAN::Local, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPAN::Local
CPAN shell
perl -MCPAN -e shell install CPAN::Local
For more information on module installation, please visit the detailed CPAN module installation guide.