The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

lcpan - Manage your local CPAN mirror

VERSION

This document describes version 1.022 of lcpan (from Perl distribution App-lcpan), released on 2018-02-08.

SYNOPSIS

Update (download and index) your local CPAN mirror

 % lcpan update

A mini CPAN mirror will be downloaded in your ~/cpan directory. This will take a while (it downloads ~3.5GB of files, as of 2016-01-21; subsequent updates will of course take shorter time.)

A SQLite database is also created/updated in ~/cpan/index.db which contains information about authors, modules/packages, distributions. This database is used to answer various queries.

You can run the above command e.g. daily to keep your mirror up-to-date.

Inject additional modules to your local CPAN mirror

Sometimes, you only want to add one or a few modules to the local CPAN mirror. For example, you are on a bad/expensive Internet connection and cannot afford a full mirror update. Or, you have a module that is not indexed on CPAN but want to add to your local mirror. To do that:

 % lcpan inject --author SOMEONE Foo-0.01.tar.gz Bar-Baz-2.34.tar.gz

where SOMEONE is an author ID (does not need to already exist) that you choose to put the modules under.

This will add the files to the local mirror as well as update the index.

Using your local CPAN mirror to install modules

 % lcpanm -n Some::Module

lcpanm is a thin wrapper for cpanm, the above command is equivalent to:

 % cpanm --mirror ~/cpan --mirror-only -n Some::Module

Querying your local CPAN mirror

Info about your local CPAN mirror:

 % lcpan stats
 +------------------------------+----------------------+
 | key                          | value                |
 | last_index_time              | 2015-01-15T13:09:25Z |
 | mirror_mtime                 | 2015-01-15T13:09:22Z |
 | num_authors                  | 11981                |
 | num_dists                    | 30376                |
 | num_modules                  | 151927               |
 | num_releases                 | 31877                |
 | num_releases_with_buildpl    | 6521                 |
 | num_releases_with_makefilepl | 28948                |
 | num_releases_with_metajson   | 10625                |
 | num_releases_with_metayml    | 10689                |
 | schema_version               | 3                    |
 +------------------------------+----------------------+

Add --verbose if you want more stats which normally are skipped because they can take a while to get (e.g. disk-space).

List modules:

 % lcpan modules                                ;# list all mods
 % lcpan mods <SOMEQUERY>... --detail           ;# show matching mods only (mods is alias for 'modules')
 % lcpan mods Win32                             ;# list mods containing 'Win32' in their name/abstract
 % lcpan mods Win32 API                         ;# list mods containing 'Win32' and 'API' in their name/abstract
 % lcpan mods Win32 API --or                    ;# list mods containing 'Win32' *or* 'API' in their name/abstract
 % lcpan mods 'Win32%'                          ;# perform SQL LIKE query (mods whose name/abstract begins with 'Win32')
 % lcpan mods --or --query-type exact-name Module1 Module2 --detail  ;# show detail for several mods
 % lcpan mods --author PERLANCAR                ;# mods by some author only
 % lcpan mods --dist libwww-perl                ;# mods from certain dist only
 % lcpan mods --namespace Getopt                ;# mods from certain namespace
 % lcpan mods --namespace Getopt --sort -rdeps  ;# list "popular" modules first (sort by number of reverse deps)

List namespaces:

 % lcpan namespaces                             ;# list all namespaces
 % lcpan namespaces <SOMEQUERY>... --detail     ;# show matching namespaces only
 % lcpan namespaces --or --exact-match Win32 MacOSX --detail  ;# show detail for several namespaces
 % lcpan namespaces -l1 --detail --sort -num_modules ;# list top-level namespaces sorted by number of packages

List distributions:

 % lcpan dists                                  ;# list all dists
 % lcpan dists --latest                         ;# list all latest dists
 % lcpan dists <SOMEQUERY>... --detail          ;# show matching dists only
 % lcpan dists --or --exact-match Dist1 Dist2 --detail  ;# show detail for several dists
 % lcpan dists --author PERLANCAR               ;# dists from certain author only

List authors:

 % lcpan authors                                ;# list all authors
 % lcpan authors <SOMEQUERY>... --detail        ;# list matching authors only
 % lcpan authors --or --exact-match PERLANCAR KENTNL --detail  ;# show detail for several authors

List releases (tarballs):

 % lcpan releases                               ;# list all releases
 % lcpan rels <SOMEQUERY>... --detail           ;# rels is alias for 'releases'
 % lcpan rels --or --exact-match Foo-1.23.tar.gz Bar-2.34.tar.gz --detail  ;# show detail for several rels
 % lcpan rels --author PERLANCAR                ;# rels from certain authors only

List contents (files inside release archives):

 % lcpan contents                               ;# WARNING: LOTS of output
 % lcpan contents <SOMEQUERY> ... --detail      ;# search, show detail
 % lcpan contents --dist File-Path              ;# list content of a single dist only

List scripts:

 % lcpan scripts                                ;# WARNING: lots of output
 % lcpan scripts <SOMEQUERY> ... --detail       ;# search, show detail
 % lcpan scripts --dist App-PMUtils             ;# list scripts of a single dist only

Show dependencies and reverse dependencies:

 % lcpan deps Text::ANSITable    ;# which modules does Text::ANSITable depend on?
 % lcpan deps Text::ANSITable -R ;# recursive
 % lcpan deps Text::ANSITable -R --flatten ;# recursive & flatten result
 % lcpan deps Task::BeLike::CSSON --phase build
 % lcpan deps Text::ANSITable --phase ALL --rel ALL

 % lcpan rdeps Text::ANSITable ;# which dists depend on Text::ANSITable?

Show mentions (references to modules/scripts from POD files within releases):

 % lcpan mentions --mentioned-module Path::Tiny ;# who mentions Path::Tiny module?
 % lcpan mentions --mentioned-script mpath      ;# who mentions mpath script?

Some other utilities:

 % lcpan mod2dist Text::ANSITable::ColorTheme::Default ;# -> Text-ANSITable

 % lcpan mod2rel  Text::ANSITable::ColorTheme::Default ;# -> Text-ANSITable-0.39.tar.gz
 % lcpan mod2rel  Text::ANSITable --full-path          ;# -> /cpan/authors/id/P/PE/PERLANCAR/Text-ANSITable-0.39.tar.gz

 % lcpan dist2rel Text-ANSITable             ;# -> Text-ANSITable-0.39.tar.gz
 % lcpan dist2rel Text-ANSITable --full-path ;# -> /cpan/authors/id/P/PE/PERLANCAR/Text-ANSITable-0.39.tar.gz

 % lcpan dist-mods Text-ANSITable ;# list modules in a distribution
 Text::ANSITable
 Text::ANSITable::BorderStyle::Default
 Text::ANSITable::ColorTheme::Default
 Text::ANSITable::StyleSet::AltRow

 % lcpan dist-scripts Text-ANSITable ;# list scripts in a distribution

 % lcpan author-mods PERLANCAR   ;# list an author's modules
 % lcpan author-dists PERLANCAR  ;# list an author's dists
 % lcpan author-rels PERLANCAR   ;# list an author's releases

 # who are authors with the most number of releases?
 % lcpan authors-by-rel-count

 # who are authors with the most number of distributions?
 % lcpan authors-by-dist-count

 # who are authors with the most number of registered modules/packages?
 % lcpan authors-by-mod-count

 # show all other authors' distributions using one of your modules
 % lcpan author-rdeps PERLANCAR --user-author-isnt PERLANCAR

 # show your old releases (which you should probably delete from CPAN?)
 % lcpan releases --author PERLANCAR --nolatest

 # what are modules that are used the most by other distributions?
 % lcpan mods-by-rdep-count

 # show POD documentation for module/.pod/script (works for uninstalled
 # modules/scripts since this works by extracting the POD from release tarballs
 # in the mirror)
 % lcpan doc Rinci            ;# looks for .pod, .pm, or script
 % lcpan doc Rinci.pod        ;# specifically looks for .pod
 % lcpan doc Rinci.pm         ;# specifically looks for .pm
 % lcpan doc plackup          ;# script
 % lcpan doc plackup -r       ;# dump the raw POD instead of rendering it

More subcommands are available. lcpan is plugin-based, see/install App::lcpan::Cmd::* modules for more subcommands.

DESCRIPTION

This application is a convenient bundling of CPAN::Mini and an indexer so in addition to creating your local CPAN mirror and installing modules from it, you can also query various things about your local CPAN mirror quickly from the command-line (as well as programmatically). Powerful and more convenient querying is the main reason lcpan is created.

MORE EXAMPLE QUERIES AND COMMANDS FOR CPAN USERS

Show how many dists will need to be installed if I install this module

TODO

Install all modules from a certain CPAN author

 % lcpan author-mods PERLANCAR | cpanm -n

or (if you want to install from local CPAN mirror):

 % lcpan author-mods PERLANCAR | lcpanm -n

or (specify release files directly):

 % lcpan author-rels --latest PERLANCAR | cpanm -n

Update all modules on your system, from local CPAN mirror

 % cpan-outdated --mirror file:$HOME/cpan | lcpanm -n

MORE EXAMPLE QUERIES AND COMMANDS FOR CPAN AUTHORS

Count your CPAN modules, dists, and releases

 % lcpan author-mods  PERLANCAR | wc -l
 % lcpan author-dists PERLANCAR | wc -l
 % lcpan author-rels  PERLANCAR | wc -l

More complex queries

For more complex queries, you can always access the SQLite database directly. See App::lcpan for the database schema.

SUBCOMMANDS

author-deps

List dependencies for all of the dists of an author.

author-deps-by-dependent-count

List all dependencies of dists of an author, sorted by number of dependent dists.

author-dists

List distributions of an author.

author-mods

List modules of an author.

author-rdeps

Find distributions that use one of author's modules.

author-rels

List releases of an author.

author-scripts

List scripts of an author.

authors

List authors.

authors-by-dist-count

List authors ranked by number of dists.

authors-by-filesize

List authors ranked by total size of their indexed releases.

authors-by-mod-count

List authors ranked by number of modules.

authors-by-mod-mention-count

List authors ranked by number of module mentions.

This shows the list of most mentioned authors, that is, authors whose modules are linked/referred to the most in PODs.

By default, each source module/script that mentions a module from author is counted as one mention (--count-per content). Use --count-per dist to only count mentions by modules/scripts from the same dist as one mention (so an author only gets a maximum of 1 vote per dist). Use --count-per author to only count mentions by modules/scripts from the same author as one mention (so an author only gets a maximum of 1 vote per mentioning author).

By default, only mentions from other authors are included. Use --include-self-mentions to also include mentions from the same author.

authors-by-rdep-count

List authors ranked by number of distributions using one of his/her modules.

authors-by-rel-count

List authors ranked by number of releases.

authors-by-script-count

List authors ranked by number of scripts.

changes

Show Changes of distribution/module.

This command will find a file named Changes/CHANGES/ChangeLog or other similar name in the top-level directory inside the release tarballs and show it.

contents

List contents inside releases.

This subcommand lists files inside release archives.

copy-mod

Copy a module's latest release file to current directory.

copy-rel

Copy a release file to current directory.

copy-script

Copy a script's latest release file to current directory.

delete-rel

Delete a release record in the database.

Will delete records associated with a release in the database (including in the file table, module, dist, dep, and so on). If --delete-file option is specified, will also remove the file from the local mirror.

But currently will not remove/update the modules/02packages.details.txt.gz index.

deps

List dependencies.

By default only runtime requires are displayed. To see prereqs for other phases (e.g. configure, or build, or ALL) or for other relationships (e.g. recommends, or ALL), use the --phase and --rel options.

Note that dependencies information are taken from META.json or META.yml files. Not all releases (especially older ones) contain them. lcpan (like MetaCPAN) does not extract information from Makefile.PL or Build.PL because that requires running (untrusted) code.

Also, some releases specify dynamic config, so there might actually be more dependencies.

deps-by-dependent-count

List dependencies, sorted by number of dependents.

This subcommand is like deps, except that this subcommand does not support recursing and it sorts the result by number of dependent dists. For example, Suppose that dist Foo depends on Mod1 and Mod2, Bar depends on Mod2 and Mod3, and Baz depends on Mod2 and Mod3, then lcpan deps-by-dependent-count Foo Bar Baz will return Mod2 (3 dependents), Mod3 (2 dependents), Mod1 (1 dependent).

dist-contents

List contents inside a distribution.

This subcommand lists files inside a distribution.

 % lcpan dist-contents Foo-Bar

is basically equivalent to:

 % lcpan contents --dist Foo-Bar

dist-meta

Get distribution metadata.

dist-mods

List modules in a distribution.

dist-scripts

List scripts in a distribution.

dist2author

Get author of distribution(s).

dist2rel

Get (latest) release name of a distribution.

dists

List distributions.

dists-by-dep-count

List "heavy" distributions (ranked by number of dependencies).

doc

Show POD documentation of module/.pod/script.

This command extracts module (.pm)/.pod/script from release tarballs and render its POD documentation. Since the documentation is retrieved from the release tarballs in the mirror, the module/.pod/script needs not be installed.

Note that currently this command has trouble finding documentation for core modules because those are contained in perl release tarballs instead of release tarballs of modules, and lcpan is currently not designed to work with those.

extract-mod

Extract a module's latest release file to current directory.

extract-rel

Extract a release to current directory.

extract-script

Extract a script's latest release file to current directory.

inject

Inject one or more tarballs to the mirror.

mentions

List mentions.

This subcommand lists mentions (references to modules/scripts in POD files inside releases).

Only mentions to modules/scripts in another release are indexed (i.e. mentions to modules/scripts in the same dist/release are not indexed). Only mentions to known scripts are indexed, but mentions to unknown modules are also indexed.

mentions-by-mod

List POD mentions by module(s).

This subcommand is a shortcut for:

 % lcpan mentions --mentioner-module MOD

mentions-by-script

List POD mentions by script(s).

This subcommand is a shortcut for:

 % lcpan mentions --mentioner-script SCRIPT

mentions-for-all-mods

List PODs which mention all specified module(s).

mentions-for-mod

List POD mentions for module(s).

This subcommand is a shortcut for:

 % lcpan mentions --type known-module --mentioned-module MOD

mentions-for-script

List POD mentions for script(s).

This subcommand is a shortcut for:

 % lcpan mentions --type script --mentioned-script SCRIPT

mod-contents

List contents inside a module's distribution.

This subcommand lists files inside a module's distribution.

 % lcpan mod-contents Foo::Bar

is basically equivalent to:

 % lcpan contents --dist C<lcpan mod2dist Foo::Bar>

mod2author

Get author of module(s).

mod2dist

Get distribution name of module(s).

mod2rel

Get (latest) release name of a module.

mods

Alias for 'modules'.

mods-by-mention-count

List modules ranked by number of mentions.

This shows the list of most mentioned modules, that is, modules who are linked/referred to the most in PODs.

Unknown modules (modules not indexed) are not included. Note that mentions can refer to unknown modules.

By default, each source module/script that mentions a module is counted as one mention (--count-per content). Use --count-per dist to only count mentions by modules/scripts from the same dist as one mention (so a module only gets a maximum of 1 vote per dist). Use --count-per author to only count mentions by modules/scripts from the same author as one mention (so a module only gets a maximum of 1 vote per mentioning author).

By default, only mentions from other authors are included. Use --include-self-mentions to also include mentions from the same author.

mods-by-rdep-count

List modules ranked by number of reverse dependencies.

mods-from-same-dist

Given a module, list all modules in the same distribution.

modules

List modules/packages.

namespaces

List namespaces.

rdeps

List reverse dependencies.

List other modules related to module(s).

This subcommand lists other modules that might be related to the module(s) you specify. This is done by listing modules that tend be mentioned together in POD documentation.

The scoring/ranking still needs to be tuned.

releases

List releases/tarballs.

The status field is the processing status of the file/release by lcpan. ok means file has been extracted and the meta files parsed, nofile means file is not found in mirror (possibly because the mirroring process excludes the file e.g. due to file size too large), nometa means file does not contain META.{yml,json}, unsupported means file archive format is not supported (e.g. rar), err means some other error in processing file.

rels

Alias for 'releases'.

The status field is the processing status of the file/release by lcpan. ok means file has been extracted and the meta files parsed, nofile means file is not found in mirror (possibly because the mirroring process excludes the file e.g. due to file size too large), nometa means file does not contain META.{yml,json}, unsupported means file archive format is not supported (e.g. rar), err means some other error in processing file.

reset

Reset (empty) the database index.

script2author

Get author name of script(s).

script2dist

Get distribution(s) of script(s).

script2mod

Get module(s) of script(s).

This returns a module name from the same dist as the script, so one can do something like this (install dist which contains a specified script from CPAN):

 % cpanm -n C<lcpan script2mod pmdir>

script2rel

Get release(s) of script(s).

scripts

List scripts.

This subcommand lists scripts. Scripts are identified heuristically from contents of release archives matching this regex:

 #         container dir,  script dir,       script name
 \A (\./)? ([^/]+)/?       (s?bin|scripts?)/ ([^/]+) \z

A few exception are excluded, e.g. if script name begins with a dot (e.g. bin/.exists which is usually a marker only).

Scripts are currently indexed by its release file and its name, so if a single release contains both bin/foo and script/foo, only one of those will be indexed. Normally a proper release shouldn't be like that though.

scripts-by-mention-count

List scripts ranked by number of mentions.

This shows the list of most mentioned scripts, that is, scripts who are linked/referred to the most in PODs.

By default, each source module/script that mentions a script is counted as one mention (--count-per content). Use --count-per dist to only count mentions by modules/scripts from the same dist as one mention (so a script only gets a maximum of 1 vote per dist). Use --count-per author to only count mentions by modules/scripts from the same author as one mention (so a script only gets a maximum of 1 vote per mentioning author).

By default, only mentions from other authors are included. Use --include-self-mentions to also include mentions from the same author.

scripts-from-same-dist

Given a script, list all scripts in the same distribution.

src

Show source of module/.pod/script.

This command is a shortcut for:

 % lcpan doc --raw MODULE_OR_POD_OR_SCRIPT

stats

Statistics of your local CPAN mirror.

stats-last-index-time

Return last index time of mirror.

This is mostly to support App::lcpan::Call. See also stats subcommand which gives a more complete statistics, but can be much slower.

subnames-by-count

List subroutine names ranked by number of occurrences.

subs

List subroutines.

This subcommand lists subroutines/methods/static methods.

update

Create/update local CPAN mirror.

This subcommand first create/update the mirror files by downloading from a remote CPAN mirror, then update the index.

OPTIONS

* marks required options.

Common options

--config-path=filename

Set path to configuration file.

Can be specified multiple times.

--config-profile=s

Set configuration profile to use.

--cpan=s

Location of your local CPAN mirror, e.g. /path/to/cpan.

Defaults to ~/cpan.

--debug

Shortcut for --log-level=debug.

--format=s

Choose output format, e.g. json, text.

Default value:

 undef
--help, -h, -?

Display help message and exit.

--index-name=s

Filename of index.

Default value:

 "index.db"
--json

Set output format to json.

--log-level=s

Set log level.

--no-config

Do not use any configuration file.

--no-env

Do not read environment for default options.

--no-naked-res

When outputing as JSON, add result envelope.

By default, when outputing as JSON, the full enveloped result is returned, e.g.:

    [200,"OK",[1,2,3],{"func.extra"=>4}]

The reason is so you can get the status (1st element), status message (2nd element) as well as result metadata/extra result (4th element) instead of just the result (3rd element). However, sometimes you want just the result, e.g. when you want to pipe the result for more post-processing. In this case you can use `--naked-res` so you just get:

    [1,2,3]
--quiet

Shortcut for --log-level=error.

--subcommands

List available subcommands.

--trace

Shortcut for --log-level=trace.

--verbose

Shortcut for --log-level=info.

--version, -v

Display program's version and exit.

Options for subcommand author-deps

--all

Equivalent to --phase ALL --rel ALL.

See --phase.

--author=s*
--flatten

Instead of showing tree-like information, flatten it.

When recursing, the default is to show the final result in a tree-like table, i.e. indented according to levels, e.g.:

    % lcpan deps -R MyModule
    | module            | author  | version |
    |-------------------|---------|---------|
    | Foo               | AUTHOR1 | 0.01    |
    |   Bar             | AUTHOR2 | 0.23    |
    |   Baz             | AUTHOR3 | 1.15    |
    | Qux               | AUTHOR2 | 0       |

To be brief, if `Qux` happens to also depends on `Bar`, it will not be shown in the result. Thus we don't know the actual `Bar` version that is needed by the dependency tree of `MyModule`. For example, if `Qux` happens to depends on `Bar` version 0.45 then `MyModule` indirectly requires `Bar` 0.45.

To list all the direct and indirect dependencies on a single flat list, with versions already resolved to the largest version required, use the `flatten` option:

    % lcpan deps -R --flatten MyModule
    | module            | author  | version |
    |-------------------|---------|---------|
    | Foo               | AUTHOR1 | 0.01    |
    | Bar               | AUTHOR2 | 0.45    |
    | Baz               | AUTHOR3 | 1.15    |
    | Qux               | AUTHOR2 | 0       |

Note that `Bar`'s required version is already 0.45 in the above example.

--level=s, -l

Recurse for a number of levels (-1 means unlimited).

Default value:

 1
--module-author-isnt=s@

Do not list depended modules published by specified author(s).

Can be specified multiple times.

--module-author=s@

Only list depended modules published by specified author(s).

Can be specified multiple times.

--module-authors-arent-json=s

Do not list depended modules published by specified author(s) (JSON-encoded).

See --module-author-isnt.

--module-authors-json=s

Only list depended modules published by specified author(s) (JSON-encoded).

See --module-author.

--no-include-core

Exclude core modules.

--no-include-noncore

Exclude non-core modules.

--perl-version=s, -V

Set base Perl version for determining core modules.

Default value:

 "v5.26.0"
--phase=s

Default value:

 "runtime"
--rel=s

Default value:

 "requires"
--with-xs-or-pp

Check each dependency as XS/PP.

-R

Recurse (alias for `--level -1`).

See --level.

Options for subcommand author-deps-by-dependent-count

--all

Equivalent to --phase ALL --rel ALL.

See --phase.

--author-isnt=s@

Can be specified multiple times.

--author=s*
--author=s@

Can be specified multiple times.

--authors-arent-json=s

See --author-isnt.

--authors-json=s

See --author.

--module-author-isnt=s@

Can be specified multiple times.

--module-author=s@

Can be specified multiple times.

--module-authors-arent-json=s

See --module-author-isnt.

--module-authors-json=s

See --module-author.

--no-include-core

Exclude core modules.

--no-include-noncore

Exclude non-core modules.

--perl-version=s, -V

Set base Perl version for determining core modules.

Default value:

 "v5.26.0"
--phase=s

Default value:

 "runtime"
--rel=s

Default value:

 "requires"

Options for subcommand author-dists

--author=s*
--detail, -l
--latest

Options for subcommand author-mods

--author=s*
--detail, -l

Options for subcommand author-rdeps

--all

Equivalent to --phase ALL --rel ALL.

See --phase.

--author=s*
--phase=s

Default value:

 "ALL"
--rel=s

Default value:

 "ALL"
--user-author-isnt=s@

Can be specified multiple times.

--user-author=s@

Can be specified multiple times.

--user-authors-arent-json=s

See --user-author-isnt.

--user-authors-json=s

See --user-author.

Options for subcommand author-rels

--author=s*
--detail, -l
--full-path
--latest
--sort-json=s

See --sort.

--sort=s@

Default value:

 ["name"]

Can be specified multiple times.

Options for subcommand author-scripts

--author=s*
--detail, -l

Options for subcommand authors

--detail, -l
--or

When there are more than one query, perform OR instead of AND logic.

--query-json=s, -q

Search query (JSON-encoded).

See --query.

--query-type=s

Default value:

 "any"

Valid values:

 ["any","cpanid","exact-cpanid","fullname","email","exact-email"]
--query=s@

Search query.

Can be specified multiple times.

-n

Shortcut --query-type cpanid.

See --query-type.

-x

Shortcut --query-type exact-cpanid.

See --query-type.

Options for subcommand authors-by-mod-mention-count

--count-per=s

Default value:

 "content"

Valid values:

 ["content","dist","author"]
--include-self-mentions

Options for subcommand authors-by-rdep-count

--all

Equivalent to --phase ALL --rel ALL.

See --phase.

--exclude-same-author
--phase=s
--rel=s

Options for subcommand changes

--module-or-dist-or-script=s*

Module or dist or script name.

Options for subcommand contents

--author=s, -a

Filter by author.

--detail, -l
--dist=s

Filter by file ID.

--or

When there are more than one query, perform OR instead of AND logic.

--package=s
--query-json=s, -q

Search query (JSON-encoded).

See --query.

--query-type=s

Default value:

 "any"

Valid values:

 ["any","path","exact-path","package","exact-package"]
--query=s@

Search query.

Can be specified multiple times.

Options for subcommand copy-mod

--module=s*
--overwrite, -o

Whether to overwrite existing file.

Options for subcommand copy-rel

--overwrite, -o

Whether to overwrite existing file.

--release=s*

Options for subcommand copy-script

--all, -a
--overwrite, -o

Whether to overwrite existing file.

--script=s*

Options for subcommand delete-rel

--delete-file

Whether to delete the release file from the filesystem too.

--release=s*

Options for subcommand deps

--all

Equivalent to --phase ALL --rel ALL.

See --phase.

--flatten

Instead of showing tree-like information, flatten it.

When recursing, the default is to show the final result in a tree-like table, i.e. indented according to levels, e.g.:

    % lcpan deps -R MyModule
    | module            | author  | version |
    |-------------------|---------|---------|
    | Foo               | AUTHOR1 | 0.01    |
    |   Bar             | AUTHOR2 | 0.23    |
    |   Baz             | AUTHOR3 | 1.15    |
    | Qux               | AUTHOR2 | 0       |

To be brief, if `Qux` happens to also depends on `Bar`, it will not be shown in the result. Thus we don't know the actual `Bar` version that is needed by the dependency tree of `MyModule`. For example, if `Qux` happens to depends on `Bar` version 0.45 then `MyModule` indirectly requires `Bar` 0.45.

To list all the direct and indirect dependencies on a single flat list, with versions already resolved to the largest version required, use the `flatten` option:

    % lcpan deps -R --flatten MyModule
    | module            | author  | version |
    |-------------------|---------|---------|
    | Foo               | AUTHOR1 | 0.01    |
    | Bar               | AUTHOR2 | 0.45    |
    | Baz               | AUTHOR3 | 1.15    |
    | Qux               | AUTHOR2 | 0       |

Note that `Bar`'s required version is already 0.45 in the above example.

--level=s, -l

Recurse for a number of levels (-1 means unlimited).

Default value:

 1
--module=s@*

Can be specified multiple times.

--modules-json=s

See --module.

--no-include-core

Exclude core modules.

--no-include-noncore

Exclude non-core modules.

--perl-version=s, -V

Set base Perl version for determining core modules.

Default value:

 "v5.26.0"
--phase=s

Default value:

 "runtime"
--rel=s

Default value:

 "requires"
--with-xs-or-pp

Check each dependency as XS/PP.

-R

Recurse (alias for `--level -1`).

See --level.

Options for subcommand deps-by-dependent-count

--all

Equivalent to --phase ALL --rel ALL.

See --phase.

--author-isnt=s@

Can be specified multiple times.

--author=s@

Can be specified multiple times.

--authors-arent-json=s

See --author-isnt.

--authors-json=s

See --author.

--module=s@*

Can be specified multiple times.

--modules-json=s

See --module.

--no-include-core

Exclude core modules.

--no-include-noncore

Exclude non-core modules.

--perl-version=s, -V

Set base Perl version for determining core modules.

Default value:

 "v5.26.0"
--phase=s

Default value:

 "runtime"
--rel=s

Default value:

 "requires"

Options for subcommand dist-contents

--author=s, -a

Filter by author.

--detail, -l
--dist=s*
--or

When there are more than one query, perform OR instead of AND logic.

--package=s

Options for subcommand dist-meta

--dist=s*

Options for subcommand dist-mods

--detail, -l
--dist=s*

Options for subcommand dist-scripts

--detail, -l
--dist=s*

Options for subcommand dist2author

--dist=s@*

Can be specified multiple times.

--dists-json=s

See --dist.

Options for subcommand dist2rel

--dist=s*
--full-path

Options for subcommand dists

--author=s, -a

Filter by author.

--detail, -l
--has-buildpl
--has-makefilepl
--has-metajson
--has-metayml
--has-multiple-rels

Only list dists having multiple releases indexed.

--latest
--or

When there are more than one query, perform OR instead of AND logic.

--query-json=s, -q

Search query (JSON-encoded).

See --query.

--query-type=s

Default value:

 "any"

Valid values:

 ["any","name","exact-name","abstract"]
--query=s@

Search query.

Can be specified multiple times.

--rel-mtime-newer-than=s
--sort-json=s

Sort the result (JSON-encoded).

See --sort.

--sort=s@

Sort the result.

Default value:

 ["dist"]

Can be specified multiple times.

-n

Shortcut --query-type name.

See --query-type.

-x

Shortcut --query-type exact-name.

See --query-type.

Options for subcommand dists-by-dep-count

--all

Equivalent to --phase ALL --rel ALL.

See --phase.

--author=s, -a

Filter by author.

--phase=s
--rel=s

Options for subcommand doc

--format-arg=s

Default value:

 "man"

Valid values:

 ["raw","html","man"]
--html

Show HTML documentation in browser instead of rendering as man.

See --format-arg.

--man

Read as manpage (the default).

See --format-arg.

--name=s*

Module or script name.

If the name matches both module name and script name, the module will be chosen. To choose the script, use `--script` (`-s`).

--raw

Dump raw POD instead of rendering it.

See --format-arg.

--script, -s

Look for script first.

-r

Same as --raw.

See --format-arg.

Options for subcommand extract-mod

--module=s*

Options for subcommand extract-rel

--release=s*

Options for subcommand extract-script

--all, -a
--script=s*

Options for subcommand inject

--author=s*, -a
--file=s@*

Can be specified multiple times.

--files-json=s

See --file.

Options for subcommand mentions

--mentioned-author=s@

Filter by author(s) of module/script being mentioned.

Can be specified multiple times.

--mentioned-authors-json=s

Filter by author(s) of module/script being mentioned (JSON-encoded).

See --mentioned-author.

--mentioned-module=s@

Filter by module name(s) being mentioned.

Can be specified multiple times.

--mentioned-modules-json=s

Filter by module name(s) being mentioned (JSON-encoded).

See --mentioned-module.

--mentioned-script=s@

Filter by script name(s) being mentioned.

Can be specified multiple times.

--mentioned-scripts-json=s

Filter by script name(s) being mentioned (JSON-encoded).

See --mentioned-script.

--mentioner-author-isnt=s@

Can be specified multiple times.

--mentioner-author=s@

Filter by author(s) of POD that does the mentioning.

Can be specified multiple times.

--mentioner-authors-arent-json=s

See --mentioner-author-isnt.

--mentioner-authors-json=s

Filter by author(s) of POD that does the mentioning (JSON-encoded).

See --mentioner-author.

--mentioner-module=s@

Filter by module(s) that do the mentioning.

Can be specified multiple times.

--mentioner-modules-json=s

Filter by module(s) that do the mentioning (JSON-encoded).

See --mentioner-module.

--mentioner-script=s@

Filter by script(s) that do the mentioning.

Can be specified multiple times.

--mentioner-scripts-json=s

Filter by script(s) that do the mentioning (JSON-encoded).

See --mentioner-script.

--type=s

Filter by type of things being mentioned.

Default value:

 "any"

Valid values:

 ["any","script","module","unknown-module","known-module"]

Options for subcommand mentions-by-mod

--mentioned-author=s@

Filter by author(s) of module/script being mentioned.

Can be specified multiple times.

--mentioned-authors-json=s

Filter by author(s) of module/script being mentioned (JSON-encoded).

See --mentioned-author.

--mentioned-module=s@

Filter by module name(s) being mentioned.

Can be specified multiple times.

--mentioned-modules-json=s

Filter by module name(s) being mentioned (JSON-encoded).

See --mentioned-module.

--mentioned-script=s@

Filter by script name(s) being mentioned.

Can be specified multiple times.

--mentioned-scripts-json=s

Filter by script name(s) being mentioned (JSON-encoded).

See --mentioned-script.

--module=s@*

Can be specified multiple times.

--modules-json=s

See --module.

--type=s

Filter by type of things being mentioned.

Default value:

 "any"

Valid values:

 ["any","script","module","unknown-module","known-module"]

Options for subcommand mentions-by-script

--mentioned-author=s@

Filter by author(s) of module/script being mentioned.

Can be specified multiple times.

--mentioned-authors-json=s

Filter by author(s) of module/script being mentioned (JSON-encoded).

See --mentioned-author.

--mentioned-module=s@

Filter by module name(s) being mentioned.

Can be specified multiple times.

--mentioned-modules-json=s

Filter by module name(s) being mentioned (JSON-encoded).

See --mentioned-module.

--mentioned-script=s@

Filter by script name(s) being mentioned.

Can be specified multiple times.

--mentioned-scripts-json=s

Filter by script name(s) being mentioned (JSON-encoded).

See --mentioned-script.

--script=s@*

Can be specified multiple times.

--scripts-json=s

See --script.

Options for subcommand mentions-for-all-mods

--mentioned-author=s@

Filter by author(s) of module/script being mentioned.

Can be specified multiple times.

--mentioned-authors-json=s

Filter by author(s) of module/script being mentioned (JSON-encoded).

See --mentioned-author.

--mentioner-author-isnt=s@

Can be specified multiple times.

--mentioner-author=s@

Filter by author(s) of POD that does the mentioning.

Can be specified multiple times.

--mentioner-authors-arent-json=s

See --mentioner-author-isnt.

--mentioner-authors-json=s

Filter by author(s) of POD that does the mentioning (JSON-encoded).

See --mentioner-author.

--mentioner-module=s@

Filter by module(s) that do the mentioning.

Can be specified multiple times.

--mentioner-modules-json=s

Filter by module(s) that do the mentioning (JSON-encoded).

See --mentioner-module.

--mentioner-script=s@

Filter by script(s) that do the mentioning.

Can be specified multiple times.

--mentioner-scripts-json=s

Filter by script(s) that do the mentioning (JSON-encoded).

See --mentioner-script.

--module=s@*

Can be specified multiple times.

--modules-json=s

See --module.

Options for subcommand mentions-for-mod

--mentioned-author=s@

Filter by author(s) of module/script being mentioned.

Can be specified multiple times.

--mentioned-authors-json=s

Filter by author(s) of module/script being mentioned (JSON-encoded).

See --mentioned-author.

--mentioner-author-isnt=s@

Can be specified multiple times.

--mentioner-author=s@

Filter by author(s) of POD that does the mentioning.

Can be specified multiple times.

--mentioner-authors-arent-json=s

See --mentioner-author-isnt.

--mentioner-authors-json=s

Filter by author(s) of POD that does the mentioning (JSON-encoded).

See --mentioner-author.

--mentioner-module=s@

Filter by module(s) that do the mentioning.

Can be specified multiple times.

--mentioner-modules-json=s

Filter by module(s) that do the mentioning (JSON-encoded).

See --mentioner-module.

--mentioner-script=s@

Filter by script(s) that do the mentioning.

Can be specified multiple times.

--mentioner-scripts-json=s

Filter by script(s) that do the mentioning (JSON-encoded).

See --mentioner-script.

--module=s@*

Can be specified multiple times.

--modules-json=s

See --module.

Options for subcommand mentions-for-script

--mentioned-author=s@

Filter by author(s) of module/script being mentioned.

Can be specified multiple times.

--mentioned-authors-json=s

Filter by author(s) of module/script being mentioned (JSON-encoded).

See --mentioned-author.

--mentioner-author-isnt=s@

Can be specified multiple times.

--mentioner-author=s@

Filter by author(s) of POD that does the mentioning.

Can be specified multiple times.

--mentioner-authors-arent-json=s

See --mentioner-author-isnt.

--mentioner-authors-json=s

Filter by author(s) of POD that does the mentioning (JSON-encoded).

See --mentioner-author.

--mentioner-module=s@

Filter by module(s) that do the mentioning.

Can be specified multiple times.

--mentioner-modules-json=s

Filter by module(s) that do the mentioning (JSON-encoded).

See --mentioner-module.

--mentioner-script=s@

Filter by script(s) that do the mentioning.

Can be specified multiple times.

--mentioner-scripts-json=s

Filter by script(s) that do the mentioning (JSON-encoded).

See --mentioner-script.

--script=s@*

Can be specified multiple times.

--scripts-json=s

See --script.

Options for subcommand mod-contents

--author=s, -a

Filter by author.

--detail, -l
--module=s*
--or

When there are more than one query, perform OR instead of AND logic.

--package=s

Options for subcommand mod2author

--module=s@*

Can be specified multiple times.

--modules-json=s

See --module.

Options for subcommand mod2dist

--module=s@*

Can be specified multiple times.

--modules-json=s

See --module.

Options for subcommand mod2rel

--full-path
--module=s*

Options for subcommand mods

--author=s, -a

Filter by author.

--detail, -l
--dist=s, -d

Filter by distribution.

--latest
--namespace=s@, -N

Select modules belonging to certain namespace(s).

Can be specified multiple times.

--namespaces-json=s

Select modules belonging to certain namespace(s) (JSON-encoded).

See --namespace.

--no-include-core

Exclude core modules.

--no-include-noncore

Exclude non-core modules.

--or

When there are more than one query, perform OR instead of AND logic.

--perl-version=s, -V

Set base Perl version for determining core modules.

Default value:

 "v5.26.0"
--query-json=s, -q

Search query (JSON-encoded).

See --query.

--query-type=s

Default value:

 "any"

Valid values:

 ["any","name","exact-name","abstract"]
--query=s@

Search query.

Can be specified multiple times.

--sort-json=s

Sort the result (JSON-encoded).

See --sort.

--sort=s@

Sort the result.

Default value:

 ["module"]

Can be specified multiple times.

-n

Shortcut --query-type name.

See --query-type.

-x

Shortcut --query-type exact-name.

See --query-type.

Options for subcommand mods-by-mention-count

--count-per=s

Default value:

 "content"

Valid values:

 ["content","dist","author"]
--include-self-mentions

Options for subcommand mods-by-rdep-count

--all

Equivalent to --phase ALL --rel ALL.

See --phase.

--author=s, -a

Filter by author.

--phase=s
--rel=s

Options for subcommand mods-from-same-dist

--detail, -l
--latest
--module=s@*

Can be specified multiple times.

--modules-json=s

See --module.

Options for subcommand modules

--author=s, -a

Filter by author.

--detail, -l
--dist=s, -d

Filter by distribution.

--latest
--namespace=s@, -N

Select modules belonging to certain namespace(s).

Can be specified multiple times.

--namespaces-json=s

Select modules belonging to certain namespace(s) (JSON-encoded).

See --namespace.

--no-include-core

Exclude core modules.

--no-include-noncore

Exclude non-core modules.

--or

When there are more than one query, perform OR instead of AND logic.

--perl-version=s, -V

Set base Perl version for determining core modules.

Default value:

 "v5.26.0"
--query-json=s, -q

Search query (JSON-encoded).

See --query.

--query-type=s

Default value:

 "any"

Valid values:

 ["any","name","exact-name","abstract"]
--query=s@

Search query.

Can be specified multiple times.

--sort-json=s

Sort the result (JSON-encoded).

See --sort.

--sort=s@

Sort the result.

Default value:

 ["module"]

Can be specified multiple times.

-n

Shortcut --query-type name.

See --query-type.

-x

Shortcut --query-type exact-name.

See --query-type.

Options for subcommand namespaces

--detail, -l
--from-level=s
--level=s
--or

When there are more than one query, perform OR instead of AND logic.

--query-json=s, -q

Search query (JSON-encoded).

See --query.

--query-type=s

Default value:

 "any"

Valid values:

 ["any","name","exact-name"]
--query=s@

Search query.

Can be specified multiple times.

--sort=s

Default value:

 "name"

Valid values:

 ["name","-name","num_modules","-num_modules"]
--to-level=s

Options for subcommand rdeps

--all

Equivalent to --phase ALL --rel ALL.

See --phase.

--author-isnt=s@

Filter out certain author.

This can be used to filter out certain author(s). For example if you want to know whether a module is being used by another CPAN author instead of just herself.

Can be specified multiple times.

--author=s@

Filter certain author.

This can be used to select certain author(s).

Can be specified multiple times.

--authors-arent-json=s

Filter out certain author (JSON-encoded).

See --author-isnt.

--authors-json=s

Filter certain author (JSON-encoded).

See --author.

--level=s, -l

Recurse for a number of levels (-1 means unlimited).

Default value:

 1
--module=s@*

Can be specified multiple times.

--modules-json=s

See --module.

--phase=s

Default value:

 "ALL"
--rel=s

Default value:

 "ALL"
-R

Recurse (alias for `--level 10`).

See --level.

--limit=s

Maximum number of modules to return.

Default value:

 20
--module=s@*

Can be specified multiple times.

--modules-json=s

See --module.

--skip-same-dist

Skip modules from the same distribution.

--sort-json=s

See --sort.

--sort=s@

Default value:

 ["-score","-num_mentions"]

Can be specified multiple times.

--with-scores

Return score-related fields.

Options for subcommand releases

--author=s, -a

Filter by author.

--detail, -l
--full-path
--has-buildpl
--has-makefilepl
--has-metajson
--has-metayml
--latest
--no-path
--or

When there are more than one query, perform OR instead of AND logic.

--query-json=s, -q

Search query (JSON-encoded).

See --query.

--query-type=s

Default value:

 "any"

Valid values:

 ["any","name","exact-name"]
--query=s@

Search query.

Can be specified multiple times.

--sort-json=s

See --sort.

--sort=s@

Default value:

 ["name"]

Can be specified multiple times.

-n

Shortcut --query-type name.

See --query-type.

-x

Shortcut --query-type exact-name.

See --query-type.

Options for subcommand rels

--author=s, -a

Filter by author.

--detail, -l
--full-path
--has-buildpl
--has-makefilepl
--has-metajson
--has-metayml
--latest
--no-path
--or

When there are more than one query, perform OR instead of AND logic.

--query-json=s, -q

Search query (JSON-encoded).

See --query.

--query-type=s

Default value:

 "any"

Valid values:

 ["any","name","exact-name"]
--query=s@

Search query.

Can be specified multiple times.

--sort-json=s

See --sort.

--sort=s@

Default value:

 ["name"]

Can be specified multiple times.

-n

Shortcut --query-type name.

See --query-type.

-x

Shortcut --query-type exact-name.

See --query-type.

Options for subcommand script2author

--all, -a
--script=s@*

Can be specified multiple times.

--scripts-json=s

See --script.

Options for subcommand script2dist

--all, -a
--script=s@*

Can be specified multiple times.

--scripts-json=s

See --script.

Options for subcommand script2mod

--all, -a
--script=s@*

Can be specified multiple times.

--scripts-json=s

See --script.

Options for subcommand script2rel

--all, -a
--full-path
--script=s@*

Can be specified multiple times.

--scripts-json=s

See --script.

Options for subcommand scripts

--author=s, -a

Filter by author.

--detail, -l
--dist=s, -d

Filter by distribution.

--or

When there are more than one query, perform OR instead of AND logic.

--query-json=s, -q

Search query (JSON-encoded).

See --query.

--query-type=s

Default value:

 "any"

Valid values:

 ["any","name","exact-name","abstract"]
--query=s@

Search query.

Can be specified multiple times.

Options for subcommand scripts-by-mention-count

--count-per=s

Default value:

 "content"

Valid values:

 ["content","dist","author"]
--include-self-mentions

Options for subcommand scripts-from-same-dist

--detail, -l
--latest
--script=s@*

Can be specified multiple times.

--scripts-json=s

See --script.

Options for subcommand src

--name=s*

Module or script name.

If the name matches both module name and script name, the module will be chosen. To choose the script, use `--script` (`-s`).

--script, -s

Look for script first.

Options for subcommand subs

--author=s@

Filter by author(s) of module.

Can be specified multiple times.

--authors-json=s

Filter by author(s) of module (JSON-encoded).

See --author.

--detail, -l
--or

When there are more than one query, perform OR instead of AND logic.

--package=s@

Filter by package name(s).

Can be specified multiple times.

--packages-json=s

Filter by package name(s) (JSON-encoded).

See --package.

--query-json=s, -q

Search query (JSON-encoded).

See --query.

--query-type=s

Default value:

 "any"

Valid values:

 ["any","name","exact-name"]
--query=s@

Search query.

Can be specified multiple times.

--sort-json=s

Sort the result (JSON-encoded).

See --sort.

--sort=s@

Sort the result.

Default value:

 ["sub"]

Can be specified multiple times.

Options for subcommand update

--exclude-author-json=s

Exclude files from certain author(s) (JSON-encoded).

See --exclude-author.

--exclude-author=s@

Exclude files from certain author.

Can be specified multiple times.

--force-update-index

Update the index even though there is no change in files.

--include-author-json=s

Only include files from certain author(s) (JSON-encoded).

See --include-author.

--include-author=s@

Only include files from certain author.

Can be specified multiple times.

--max-file-size=s

If set, skip downloading files larger than this.

--no-skip-sub-indexing

Since sub indexing is still experimental, it is not enabled by default. To enable it, pass the `--no-skip-sub-indexing` option.

--no-update-files

Skip updating the files.

--no-update-index

Skip updating the index.

--remote-url=s

Select CPAN mirror to download from.

--skip-file-indexing-pass-1
--skip-file-indexing-pass-2
--skip-file-indexing-pass-3
--skip-index-file=s@

Skip a file from being indexed.

Can be specified multiple times.

--skip-index-files-json=s

Skip one or more files from being indexed (JSON-encoded).

See --skip-index-file.

-F=s@

Alias for --skip-index-file.

See --skip-index-file.

Can be specified multiple times.

COMPLETION

This script has shell tab completion capability with support for several shells.

bash

To activate bash completion for this script, put:

 complete -C lcpan lcpan

in your bash startup (e.g. ~/.bashrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.

It is recommended, however, that you install modules using cpanm-shcompgen which can activate shell completion for scripts immediately.

tcsh

To activate tcsh completion for this script, put:

 complete lcpan 'p/*/`lcpan`/'

in your tcsh startup (e.g. ~/.tcshrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.

It is also recommended to install shcompgen (see above).

other shells

For fish and zsh, install shcompgen as described above.

FAQ

How to customize location of local CPAN mirror?

By default CPAN mirror is put in ~/cpan. To customize this, use the --cpan option, e.g.:

 % lcpan update --cpan /path/to/my/cpan

You can also create a configuration ~/lcpan.conf so you don't have to specify the --cpan option everytime:

 cpan=/path/to/my/cpan

Where is the SQLite database (the index) located?

In $cpan/index.db.

How do I see the SQL statements/queries being issued while running lcpan?

You can try using Log::ger::DBI::Query, e.g.:

 % PERL5OPT=-MLog::ger::DBI::Query TRACE=1 lcpan ...

How do I reindex from scratch (without downloading the mirror)?

Run lcpan reset (or delete index.db) and run lcpan update --noupdate-files again.

Indexing error: Out of memory!

Could happen when there is a corrupt archive or an archive that is too big. To see which file is the culprit, try running lcpan update --noupdate-files with --verbose (or even --debug or --trace). Then, you can skip the file by using -F or adding this entry to your lcpan.conf:

 [update]
 skip_index_files=The-Culprit-1.23.tar.gz

Add more of such lines if you want to skip more files.

How do I download the mirror without updating the indexing?

Run lcpan update --noupdate-index.

How do I see how recent the mirror or the index is?

Use lcpan stats.

CONFIGURATION FILE

This script can read configuration files. Configuration files are in the format of IOD, which is basically INI with some extra features.

By default, these names are searched for configuration filenames (can be changed using --config-path): ~/.config/lcpan.conf, ~/lcpan.conf, or /etc/lcpan.conf.

All found files will be read and merged.

To disable searching for configuration files, pass --no-config.

To put configuration for a certain subcommand only, use a section name like [subcommand=NAME] or [SOMESECTION subcommand=NAME].

You can put multiple profiles in a single file by using section names like [profile=SOMENAME] or [SOMESECTION profile=SOMENAME] or [subcommand=SUBCOMMAND_NAME profile=SOMENAME] or [SOMESECTION subcommand=SUBCOMMAND_NAME profile=SOMENAME]. Those sections will only be read if you specify the matching --config-profile SOMENAME.

You can also put configuration for multiple programs inside a single file, and use filter program=NAME in section names, e.g. [program=NAME ...] or [SOMESECTION program=NAME]. The section will then only be used when the reading program matches.

Finally, you can filter a section by environment variable using the filter env=CONDITION in section names. For example if you only want a section to be read if a certain environment variable is true: [env=SOMEVAR ...] or [SOMESECTION env=SOMEVAR ...]. If you only want a section to be read when the value of an environment variable has value equals something: [env=HOSTNAME=blink ...] or [SOMESECTION env=HOSTNAME=blink ...]. If you only want a section to be read when the value of an environment variable does not equal something: [env=HOSTNAME!=blink ...] or [SOMESECTION env=HOSTNAME!=blink ...]. If you only want a section to be read when an environment variable contains something: [env=HOSTNAME*=server ...] or [SOMESECTION env=HOSTNAME*=server ...]. Note that currently due to simplistic parsing, there must not be any whitespace in the value being compared because it marks the beginning of a new section filter or section name.

List of available configuration parameters:

Common for all subcommands

 cpan (see --cpan)
 format (see --format)
 index_name (see --index-name)
 log_level (see --log-level)
 naked_res (see --naked-res)

Configuration for subcommand author-deps

 author (see --author)
 flatten (see --flatten)
 include_core (see --no-include-core)
 include_noncore (see --no-include-noncore)
 level (see --level)
 module_authors (see --module-author)
 module_authors_arent (see --module-author-isnt)
 perl_version (see --perl-version)
 phase (see --phase)
 rel (see --rel)
 with_xs_or_pp (see --with-xs-or-pp)

Configuration for subcommand author-deps-by-dependent-count

 author (see --author)
 authors (see --author)
 authors_arent (see --author-isnt)
 include_core (see --no-include-core)
 include_noncore (see --no-include-noncore)
 module_authors (see --module-author)
 module_authors_arent (see --module-author-isnt)
 perl_version (see --perl-version)
 phase (see --phase)
 rel (see --rel)

Configuration for subcommand author-dists

 author (see --author)
 detail (see --detail)
 latest (see --latest)

Configuration for subcommand author-mods

 author (see --author)
 detail (see --detail)

Configuration for subcommand author-rdeps

 author (see --author)
 phase (see --phase)
 rel (see --rel)
 user_authors (see --user-author)
 user_authors_arent (see --user-author-isnt)

Configuration for subcommand author-rels

 author (see --author)
 detail (see --detail)
 full_path (see --full-path)
 latest (see --latest)
 sort (see --sort)

Configuration for subcommand author-scripts

 author (see --author)
 detail (see --detail)

Configuration for subcommand authors

 detail (see --detail)
 or (see --or)
 query (see --query)
 query_type (see --query-type)

Configuration for subcommand authors-by-dist-count

Configuration for subcommand authors-by-filesize

Configuration for subcommand authors-by-mod-count

Configuration for subcommand authors-by-mod-mention-count

 count_per (see --count-per)
 include_self_mentions (see --include-self-mentions)

Configuration for subcommand authors-by-rdep-count

 exclude_same_author (see --exclude-same-author)
 phase (see --phase)
 rel (see --rel)

Configuration for subcommand authors-by-rel-count

Configuration for subcommand authors-by-script-count

Configuration for subcommand changes

 module_or_dist_or_script (see --module-or-dist-or-script)

Configuration for subcommand contents

 author (see --author)
 detail (see --detail)
 dist (see --dist)
 or (see --or)
 package (see --package)
 query (see --query)
 query_type (see --query-type)

Configuration for subcommand copy-mod

 module (see --module)
 overwrite (see --overwrite)

Configuration for subcommand copy-rel

 overwrite (see --overwrite)
 release (see --release)

Configuration for subcommand copy-script

 all (see --all)
 overwrite (see --overwrite)
 script (see --script)

Configuration for subcommand delete-rel

 delete_file (see --delete-file)
 release (see --release)

Configuration for subcommand deps

 flatten (see --flatten)
 include_core (see --no-include-core)
 include_noncore (see --no-include-noncore)
 level (see --level)
 modules (see --module)
 perl_version (see --perl-version)
 phase (see --phase)
 rel (see --rel)
 with_xs_or_pp (see --with-xs-or-pp)

Configuration for subcommand deps-by-dependent-count

 authors (see --author)
 authors_arent (see --author-isnt)
 include_core (see --no-include-core)
 include_noncore (see --no-include-noncore)
 modules (see --module)
 perl_version (see --perl-version)
 phase (see --phase)
 rel (see --rel)

Configuration for subcommand dist-contents

 author (see --author)
 detail (see --detail)
 dist (see --dist)
 or (see --or)
 package (see --package)

Configuration for subcommand dist-meta

 dist (see --dist)

Configuration for subcommand dist-mods

 detail (see --detail)
 dist (see --dist)

Configuration for subcommand dist-scripts

 detail (see --detail)
 dist (see --dist)

Configuration for subcommand dist2author

 dists (see --dist)

Configuration for subcommand dist2rel

 dist (see --dist)
 full_path (see --full-path)

Configuration for subcommand dists

 author (see --author)
 detail (see --detail)
 has_buildpl (see --has-buildpl)
 has_makefilepl (see --has-makefilepl)
 has_metajson (see --has-metajson)
 has_metayml (see --has-metayml)
 has_multiple_rels (see --has-multiple-rels)
 latest (see --latest)
 or (see --or)
 query (see --query)
 query_type (see --query-type)
 rel_mtime_newer_than (see --rel-mtime-newer-than)
 sort (see --sort)

Configuration for subcommand dists-by-dep-count

 author (see --author)
 phase (see --phase)
 rel (see --rel)

Configuration for subcommand doc

 format (see --format-arg)
 name (see --name)
 script (see --script)

Configuration for subcommand extract-mod

 module (see --module)

Configuration for subcommand extract-rel

 release (see --release)

Configuration for subcommand extract-script

 all (see --all)
 script (see --script)

Configuration for subcommand inject

 author (see --author)
 files (see --file)

Configuration for subcommand mentions

 mentioned_authors (see --mentioned-author)
 mentioned_modules (see --mentioned-module)
 mentioned_scripts (see --mentioned-script)
 mentioner_authors (see --mentioner-author)
 mentioner_authors_arent (see --mentioner-author-isnt)
 mentioner_modules (see --mentioner-module)
 mentioner_scripts (see --mentioner-script)
 type (see --type)

Configuration for subcommand mentions-by-mod

 mentioned_authors (see --mentioned-author)
 mentioned_modules (see --mentioned-module)
 mentioned_scripts (see --mentioned-script)
 modules (see --module)
 type (see --type)

Configuration for subcommand mentions-by-script

 mentioned_authors (see --mentioned-author)
 mentioned_modules (see --mentioned-module)
 mentioned_scripts (see --mentioned-script)
 scripts (see --script)

Configuration for subcommand mentions-for-all-mods

 mentioned_authors (see --mentioned-author)
 mentioner_authors (see --mentioner-author)
 mentioner_authors_arent (see --mentioner-author-isnt)
 mentioner_modules (see --mentioner-module)
 mentioner_scripts (see --mentioner-script)
 modules (see --module)

Configuration for subcommand mentions-for-mod

 mentioned_authors (see --mentioned-author)
 mentioner_authors (see --mentioner-author)
 mentioner_authors_arent (see --mentioner-author-isnt)
 mentioner_modules (see --mentioner-module)
 mentioner_scripts (see --mentioner-script)
 modules (see --module)

Configuration for subcommand mentions-for-script

 mentioned_authors (see --mentioned-author)
 mentioner_authors (see --mentioner-author)
 mentioner_authors_arent (see --mentioner-author-isnt)
 mentioner_modules (see --mentioner-module)
 mentioner_scripts (see --mentioner-script)
 scripts (see --script)

Configuration for subcommand mod-contents

 author (see --author)
 detail (see --detail)
 module (see --module)
 or (see --or)
 package (see --package)

Configuration for subcommand mod2author

 modules (see --module)

Configuration for subcommand mod2dist

 modules (see --module)

Configuration for subcommand mod2rel

 full_path (see --full-path)
 module (see --module)

Configuration for subcommand mods

 author (see --author)
 detail (see --detail)
 dist (see --dist)
 include_core (see --no-include-core)
 include_noncore (see --no-include-noncore)
 latest (see --latest)
 namespaces (see --namespace)
 or (see --or)
 perl_version (see --perl-version)
 query (see --query)
 query_type (see --query-type)
 sort (see --sort)

Configuration for subcommand mods-by-mention-count

 count_per (see --count-per)
 include_self_mentions (see --include-self-mentions)

Configuration for subcommand mods-by-rdep-count

 author (see --author)
 phase (see --phase)
 rel (see --rel)

Configuration for subcommand mods-from-same-dist

 detail (see --detail)
 latest (see --latest)
 modules (see --module)

Configuration for subcommand modules

 author (see --author)
 detail (see --detail)
 dist (see --dist)
 include_core (see --no-include-core)
 include_noncore (see --no-include-noncore)
 latest (see --latest)
 namespaces (see --namespace)
 or (see --or)
 perl_version (see --perl-version)
 query (see --query)
 query_type (see --query-type)
 sort (see --sort)

Configuration for subcommand namespaces

 detail (see --detail)
 from_level (see --from-level)
 level (see --level)
 or (see --or)
 query (see --query)
 query_type (see --query-type)
 sort (see --sort)
 to_level (see --to-level)

Configuration for subcommand rdeps

 authors (see --author)
 authors_arent (see --author-isnt)
 level (see --level)
 modules (see --module)
 phase (see --phase)
 rel (see --rel)
 limit (see --limit)
 modules (see --module)
 skip_same_dist (see --skip-same-dist)
 sort (see --sort)
 with_scores (see --with-scores)

Configuration for subcommand releases

 author (see --author)
 detail (see --detail)
 full_path (see --full-path)
 has_buildpl (see --has-buildpl)
 has_makefilepl (see --has-makefilepl)
 has_metajson (see --has-metajson)
 has_metayml (see --has-metayml)
 latest (see --latest)
 no_path (see --no-path)
 or (see --or)
 query (see --query)
 query_type (see --query-type)
 sort (see --sort)

Configuration for subcommand rels

 author (see --author)
 detail (see --detail)
 full_path (see --full-path)
 has_buildpl (see --has-buildpl)
 has_makefilepl (see --has-makefilepl)
 has_metajson (see --has-metajson)
 has_metayml (see --has-metayml)
 latest (see --latest)
 no_path (see --no-path)
 or (see --or)
 query (see --query)
 query_type (see --query-type)
 sort (see --sort)

Configuration for subcommand reset

Configuration for subcommand script2author

 all (see --all)
 scripts (see --script)

Configuration for subcommand script2dist

 all (see --all)
 scripts (see --script)

Configuration for subcommand script2mod

 all (see --all)
 scripts (see --script)

Configuration for subcommand script2rel

 all (see --all)
 full_path (see --full-path)
 scripts (see --script)

Configuration for subcommand scripts

 author (see --author)
 detail (see --detail)
 dist (see --dist)
 or (see --or)
 query (see --query)
 query_type (see --query-type)

Configuration for subcommand scripts-by-mention-count

 count_per (see --count-per)
 include_self_mentions (see --include-self-mentions)

Configuration for subcommand scripts-from-same-dist

 detail (see --detail)
 latest (see --latest)
 scripts (see --script)

Configuration for subcommand src

 name (see --name)
 script (see --script)

Configuration for subcommand stats

Configuration for subcommand stats-last-index-time

Configuration for subcommand subnames-by-count

Configuration for subcommand subs

 authors (see --author)
 detail (see --detail)
 or (see --or)
 packages (see --package)
 query (see --query)
 query_type (see --query-type)
 sort (see --sort)

Configuration for subcommand update

 exclude_author (see --exclude-author)
 force_update_index (see --force-update-index)
 include_author (see --include-author)
 max_file_size (see --max-file-size)
 remote_url (see --remote-url)
 skip_file_indexing_pass_1 (see --skip-file-indexing-pass-1)
 skip_file_indexing_pass_2 (see --skip-file-indexing-pass-2)
 skip_file_indexing_pass_3 (see --skip-file-indexing-pass-3)
 skip_index_files (see --skip-index-file)
 skip_sub_indexing (see --no-skip-sub-indexing)
 update_files (see --no-update-files)
 update_index (see --no-update-index)

ENVIRONMENT

LCPAN_OPT => str

Specify additional command-line options.

FILES

~/.config/lcpan.conf

~/lcpan.conf

/etc/lcpan.conf

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/App-lcpan.

SOURCE

Source repository is at https://github.com/perlancar/perl-App-lcpan.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-lcpan

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.

SEE ALSO

setop

cpan-outdated

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018, 2017, 2016, 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.