lcpan - Manage your local CPAN mirror
This document describes version 1.073 of lcpan (from Perl distribution App-lcpan), released on 2023-07-09.
The first step to use lcpan is to create/update your local CPAN mirror. You can install the bootstrap database first to avoid doing indexing from scratch:
lcpan
% cpanm -n App::lcpan::Bootstrap
Then run:
% lcpan update --trace
A mini CPAN mirror will be downloaded/updated in your ~/cpan directory. This will take a while, e.g. a couple of hours, depending on your Internet connection speed (as of 2019-05-20 the size of a mini CPAN mirror is ~7GB). Subsequent updates will of course take significantly shorter time.
~/cpan
After download, a SQLite database will also be created/updated at ~/cpan/index.db which will contain information about authors, modules/packages, distributions. This database will be used to answer queries you might issue later. During this "indexing" process, release files will be extracted to temporary directory and the source codes will be scanned. This process will again take a while for the first time, e.g. under an hour (if you are using a fairly recent bootstrap database) or a few hours (if you are indexing from scratch). Subsequent updates will be much faster.
~/cpan/index.db
You can run the above "update" command e.g. daily to keep your mirror up-to-date. Omit the --trace option to see less debugging messages.
--trace
% lcpanm -n Some::Module
lcpanm is a thin wrapper for cpanm. The above command is equivalent to:
lcpanm
cpanm
% cpanm --mirror ~/cpan --mirror-only -n Some::Module
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).
--verbose
Listing 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)
Listing 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
Listing 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
Listing 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
Listing 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
Listing 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
Listing 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
Showing 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?
Showing 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::CmdBundle::* modules for more subcommands.
App::lcpan::CmdBundle::*
See App::lcpan::Manual for more tips, cookcooks, tutorials.
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 (creating a so-called DarkPAN based on an existing mini CPAN 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.
SOMEONE
This will add the files to the local mirror as well as update the index.
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.
CPAN::Mini
TODO
% 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
% cpan-outdated --mirror file:$HOME/cpan | lcpanm -n
% lcpan author-mods PERLANCAR | wc -l % lcpan author-dists PERLANCAR | wc -l % lcpan author-rels PERLANCAR | wc -l
For more complex queries, you can always access the SQLite database directly. See App::lcpan for the database schema.
Show a single author.
List dependencies for all of the dists of an author.
For a CPAN author, this subcommand is a shortcut for doing:
% lcpan deps Your-Dist
for all of your distributions. It shows just how many modules are you currently using in one of your distros on CPAN.
To show how many modules from other authors you are depending:
% lcpan author-deps YOURCPANID --module-author-isnt YOURCPANID
To show how many of your own modules you are depending in your own distros:
% lcpan author-deps YOURCPANID --module-author-is YOURCPANID
To find whether there are any prerequisites that you mention in your distributions that are currently broken (not indexed on CPAN):
% lcpan author-deps YOURCPANID --broken --dont-uniquify
List all dependencies of dists of an author, sorted by number of dependent dists.
List distributions of an author.
List modules of an author.
List modules of an author sorted by their number of reverse dependencies from other authors.
List modules of an author sorted by their number of reverse dependencies.
Find distributions that use one of author's modules.
List releases of an author.
List scripts of an author.
List authors.
List authors ranked by number of dists.
List authors ranked by total size of their indexed releases.
List authors ranked by number of modules.
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).
--count-per content
--count-per dist
--count-per author
By default, only mentions from other authors are included. Use --include-self-mentions to also include mentions from the same author.
--include-self-mentions
List authors ranked by number of distributions using one of his/her modules.
List authors ranked by number of releases.
List authors ranked by number of scripts.
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.
List contents inside releases.
This subcommand lists files inside release archives.
Copy a module's latest release file to current directory.
Copy a release file to current directory.
Copy a script's latest release file to current directory.
Return database path that is used.
This is a convenience subcommand for use in, e.g. command-line oneliners.
Delete old data (contents of old_* tables).
Will delete records in old_* tables.
old_*
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.
file
module
dist
dep
--delete-file
But currently will not remove/update the modules/02packages.details.txt.gz index.
modules/02packages.details.txt.gz
List dependencies of distributions.
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.
--phase
--rel
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.
META.json
META.yml
Makefile.PL
Build.PL
Also, some releases specify dynamic config, so there might actually be more dependencies.
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).
deps
Foo
Mod1
Mod2
Bar
Mod3
Baz
lcpan deps-by-dependent-count Foo Bar Baz
Show a single distribution.
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
Get distribution metadata.
List modules in a distribution.
List which distributions depend on specified distribution.
This subcommand lists all modules of your specified distribution, then run 'deps' on all of those modules. So basically, this subcommand shows which distributions depend on your specified distribution.
List scripts in a distribution.
Get author of distribution(s).
Get (latest) release name of a distribution.
List distributions.
List "heavy" distributions (ranked by number of dependencies).
List distributions ranked by number of included modules.
List distributions ranked by number of included scripts.
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 a distribution's latest release file to current directory.
Extract a module's latest release file to current directory.
Extract a release to current directory.
Extract a script's latest release file to current directory.
Alias for 'dists-by-dep-count', with default n=100.
Inject one or more tarballs to the mirror.
Show database index log.
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.
List POD mentions by module(s).
This subcommand is a shortcut for:
% lcpan mentions --mentioner-module MOD
List POD mentions by script(s).
% lcpan mentions --mentioner-script SCRIPT
List PODs which mention all specified module(s).
This subcommand searches PODs that mention all of the specified modules. To search for PODs that mention any of the specified modules, see the mentions-for-mods subcommand.
mentions-for-mods
List POD mentions for module(s).
% lcpan mentions --type known-module --mentioned-module <module1> [module2] ...
This searches PODs that mention either module1, module2, and so on. To search for PODs that mention all of the modules, see the mentions-for-all-mods subcommand.
module1
module2
mentions-for-all-mods
List POD mentions for script(s).
% lcpan mentions --type script --mentioned-script SCRIPT
Alias for 'module'.
List contents inside a module's distribution.
This subcommand lists files inside a module's distribution.
% lcpan mod-contents Foo::Bar
% lcpan contents --dist C<lcpan mod2dist Foo::Bar>
Get author of module(s).
Get distribution name of module(s).
Get (latest) release name of a module.
Alias for 'modules'.
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).
List modules depended "by most number of authors" (modules ranked by number of authors that have dists that depend on the module).
List "most depended modules" (modules ranked by number of reverse dependencies).
Given a module, list all modules in the same distribution.
Show a single module.
List modules/packages.
Alias for 'mods-by-rdep-count', with default n=100.
Alias for 'mods-by-mention-count', with default n=100.
Alias for 'scripts-by-mention-count', with default n=100.
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).
List namespaces.
List reverse dependencies.
List scripts that depend on specified modules.
This is currently implemented as rdeps + dist_scripts (find distributions that depend on specified modules, and list all scripts in those distributions):
% lcpan rdeps Some::Module | td select dist | xargs lcpan dist-scripts Some::Module
so not really accurate.
Alias for 'release'.
List other authors related to author(s).
This subcommand lists other authors that might be related to the author(s) you specify. This is done in one of the ways below which you can choose.
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 downside of this approach is that the module(s) and the related modules must all already be mentioned together in POD documentations. You will not find a fresh new module that tries to be an improvement/alternative to an existing module, even if that new module mentions the old module a lot, simply because the new module has not been mentioned in other modules' PODs. Someone will need to create that POD(s) first.
The scoring/ranking still needs to be tuned.
Show a single release.
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.
ok
nofile
nometa
unsupported
err
Alias for 'releases'.
Reset (empty) the database index.
All data tables will be emptied. This includes all records in the log table as well as index_creation_time record in the meta table, so there is no records of previous indexing activity. There is also no record of resetting in the log.
log
index_creation_time
meta
Tables are not dropped and re-created. The meta table is not emptied.
Show a single script.
Get author name of script(s).
Get distribution(s) of script(s).
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>
Get release(s) of script(s).
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).
bin/.exists
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.
bin/foo
script/foo
List scripts ranked by number of mentions.
Given a script, list all scripts in the same distribution.
Show source of module/.pod/script.
This command is a shortcut for:
% lcpan doc --raw MODULE_OR_POD_OR_SCRIPT
Statistics of your local CPAN mirror.
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.
stats
List subroutine names ranked by number of occurrences.
List subroutines.
This subcommand lists subroutines/methods/static methods.
Create/update local CPAN mirror.
This subcommand first create/update the mirror files by downloading from a remote CPAN mirror, then update the index.
Show what's added/updated recently.
List distributions which has an x_mentions relationship dependency for specified module.
* marks required options.
*
Set path to configuration file.
Can actually be specified multiple times to instruct application to read from multiple configuration files (and merge them).
Set configuration profile to use.
A single configuration file can contain profiles, i.e. alternative sets of values that can be selected. For example:
[profile=dev] username=foo pass=beaver [profile=production] username=bar pass=honey
When you specify --config-profile=dev, username will be set to foo and password to beaver. When you specify --config-profile=production, username will be set to bar and password to honey.
--config-profile=dev
username
foo
password
beaver
--config-profile=production
bar
honey
Location of your local CPAN mirror, e.g. /path/to/cpan.
Defaults to ~/cpan.
Shortcut for --log-level=debug.
Choose output format, e.g. json, text.
Default value:
undef
Output can be displayed in multiple formats, and a suitable default format is chosen depending on the application and/or whether output destination is interactive terminal (i.e. whether output is piped). This option specifically chooses an output format.
Display help message and exit.
Filename of index.
"index.db"
If index_name is a filename without any path, e.g. index.db then index will be located in the top-level of cpan. If index_name contains a path, e.g. ./index.db or /home/ujang/lcpan.db then the index will be located solely using the index_name.
index_name
index.db
cpan
./index.db
/home/ujang/lcpan.db
Set output format to json.
Set log level.
By default, these log levels are available (in order of increasing level of importance, from least important to most): trace, debug, info, warn/warning, error, fatal. By default, the level is usually set to warn, which means that log statements with level info and less important levels will not be shown. To increase verbosity, choose info, debug, or trace.
trace
debug
info
warn
warning
error
fatal
For more details on log level and logging, as well as how new logging levels can be defined or existing ones modified, see Log::ger.
Do not use any configuration file.
If you specify --no-config, the application will not read any configuration file.
--no-config
Do not read environment for default options.
If you specify --no-env, the application wil not read any environment variable.
--no-env
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:
--naked-res
[1,2,3]
Do not update database schema to the latest.
By default, when the application starts and reads the index database, it updates the database schema to the latest if the database happens to be last updated by an older version of the application and has the old database schema (since database schema is updated from time to time, for example at 1.070 the database schema is at version 15).
When you disable this option, the application will not update the database schema. This option is for testing only, because it will probably cause the application to run abnormally and then die with a SQL error when reading/writing to the database.
Note that in certain modes e.g. doing tab completion, the application also will not update the database schema.
If you are indexing your private CPAN-like repository, you want to turn this off.
Filter output through a pager.
This option will pipe the output to a specified pager program. If pager program is not specified, a suitable default e.g. less is chosen.
less
Shortcut for --log-level=error.
Update program to latest version from CPAN.
List available subcommands.
Shortcut for --log-level=trace.
Shortcut for --log-level=info.
Display program's version and exit.
View output using a viewer.
This option will first save the output to a temporary file, then open a viewer program to view the temporary file. If a viewer program is not chosen, a suitable default, e.g. the browser, is chosen.
(No description)
Can also be specified as the 1st command-line argument.
Include only records that are added/updated since the last index update.
Include only records that are added/updated since the last N index updates.
Include only records that are added/updated since a certain date.
Include only records that are added since the last index update.
Include only records that are added since the last N index updates.
Include only records that are added since a certain date.
Equivalent to --phase ALL --rel ALL.
See --phase.
Alias for --exclude-indexed --include-unindexed.
See --exclude-unindexed.
--exclude-unindexed
Allow showing multiple modules for different dists.
Exclude core modules.
Exclude modules that are indexed (listed in 02packages.details.txt.gz).
Exclude non-core modules.
Exclude modules that are not indexed (not listed in 02packages.details.txt.gz).
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.
Qux
MyModule
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:
flatten
% 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.
Recurse for a number of levels (-1 means unlimited).
1
Do not list depended modules published by specified author(s).
Can be specified multiple times.
Only list depended modules published by specified author(s).
Do not list depended modules published by specified author(s) (JSON-encoded).
See --module-author-isnt.
--module-author-isnt
Only list depended modules published by specified author(s) (JSON-encoded).
See --module-author.
--module-author
Set base Perl version for determining core modules.
"v5.38.0"
"runtime"
"requires"
Include only records that are updated since the last index update.
Include only records that are updated since the last N index updates.
Include only records that are updated since certain date.
Check each dependency as XS/PP.
Recurse (alias for `--level -1`).
See --level.
--level
See --author-isnt.
--author-isnt
See --author.
--author
"ALL"
See --user-author-isnt.
--user-author-isnt
See --user-author.
--user-author
Random sort.
See --sort.
--sort
["name"]
When there are more than one query, perform OR instead of AND logic.
Search query (JSON-encoded).
See --query.
--query
Can also be specified as the 1st command-line argument and onwards.
"any"
Valid values:
["any","cpanid","exact-cpanid","fullname","regexp-fullname","email","exact-email"]
Search query.
Only return a certain number of records.
Only return starting from the n'th record.
Sort the result (JSON-encoded).
Sort the result.
["id"]
Shortcut --query-type cpanid.
See --query-type.
--query-type
Shortcut --query-type regexp-fullname.
Shortcut --query-type exact-cpanid.
"content"
["content","dist","author"]
Module or dist or script name.
Filter by author.
Filter by distribution.
Filter by file ID.
["any","path","exact-path","package","exact-package"]
Whether to overwrite existing file.
Whether to delete the release file from the filesystem too.
Distribution names (with optional version suffix, e.g. Foo-Bar@1.23).
Distribution names (with optional version suffix, e.g. Foo-Bar@1.23) (JSON-encoded).
See --dist.
--dist
Exclude some dependencies from being shown.
Exclude some dependencies from being shown (JSON-encoded).
See --exclude-dep.
--exclude-dep
See --module.
--module
Recurse (alias for `--level 10`).
Distribution names (e.g. Foo-Bar).
Distribution names (e.g. Foo-Bar) (JSON-encoded).
Only list dists having multiple releases indexed.
["any","name","exact-name","regexp-name","abstract"]
["dist"]
Shortcut for --query-type name.
Shortcut for --query-type regexp-name.
Shortcut for --query-type exact-name.
Return at most this number of results.
"man"
["raw","html","man"]
Show HTML documentation in browser instead of rendering as man.
See --format-arg.
--format-arg
Read as manpage (the default).
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
Dump raw POD instead of rendering it.
Look for script first.
Same as --raw.
100
See --file.
--file
Filter by author(s) of module/script being mentioned.
Filter by author(s) of module/script being mentioned (JSON-encoded).
See --mentioned-author.
--mentioned-author
Filter by module name(s) being mentioned.
Filter by module name(s) being mentioned (JSON-encoded).
See --mentioned-module.
--mentioned-module
Filter by script name(s) being mentioned.
Filter by script name(s) being mentioned (JSON-encoded).
See --mentioned-script.
--mentioned-script
Filter by author(s) of POD that does the mentioning.
See --mentioner-author-isnt.
--mentioner-author-isnt
Filter by author(s) of POD that does the mentioning (JSON-encoded).
See --mentioner-author.
--mentioner-author
Filter by module(s) that do the mentioning.
Filter by module(s) that do the mentioning (JSON-encoded).
See --mentioner-module.
--mentioner-module
Filter by script(s) that do the mentioning.
Filter by script(s) that do the mentioning (JSON-encoded).
See --mentioner-script.
--mentioner-script
Filter by type of things being mentioned.
["any","script","module","unknown-module","known-module"]
See --script.
Select modules belonging to certain namespace(s).
Select modules belonging to certain namespace(s) (JSON-encoded).
See --namespace.
--namespace
["module"]
Shortcut --query-type name.
Shortcut --query-type regexp-name.
Shortcut --query-type exact-name.
Do not select dependent distributions published by specified author(s).
Only select dependent distributions published by specified author(s).
Do not select dependent distributions published by specified author(s) (JSON-encoded).
See --dist-author-isnt.
--dist-author-isnt
Only select dependent distributions published by specified author(s) (JSON-encoded).
See --dist-author.
--dist-author
["any","name","exact-name","regexp-name"]
"name"
["name","-name","num_modules","-num_modules"]
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.
Filter certain author.
This can be used to select certain author(s).
Filter out certain author (JSON-encoded).
Filter certain author (JSON-encoded).
See deps' flatten argument for more details.
Maximum number of authors to return.
20
["-score","-num_module_mentions"]
Return score-related fields.
Equivalent to --no-submodules.
See --submodules.
--submodules
Equivalent to --submodules.
Maximum number of modules to return.
Skip modules from the same distribution.
["-score","-num_mentions"]
Whether to include submodules.
If set to true, will only show related submodules, e.g. lcpan related-modules Foo::Bar will only show Foo::Bar::Baz, Foo::Bar::Quz, and so on.
lcpan related-modules Foo::Bar
Foo::Bar::Baz
Foo::Bar::Quz
If set to false, will only show related modules that are not submodules, e.g. lcpan related-modules Foo::Bar will show Baz, Foo::Baz, but not Foo::Bar::Baz.
Foo::Baz
Return the list of content paths where the module and a related module are mentioned together.
["any","name","exact-name","abstract"]
Filter by author(s) of module.
Filter by author(s) of module (JSON-encoded).
Filter by package name(s).
Filter by package name(s) (JSON-encoded).
See --package.
--package
["any","name","exact-name"]
["sub"]
Exclude files from certain author(s) (JSON-encoded).
See --exclude-author.
--exclude-author
Exclude files from certain author.
Update the index even though there is no change in files.
Only include files from certain author(s) (JSON-encoded).
See --include-author.
--include-author
Only include files from certain author.
If set, skip downloading files larger than this.
Since sub indexing is still experimental, it is not enabled by default. To enable it, pass the --no-skip-sub-indexing option.
--no-skip-sub-indexing
Skip updating the files.
Skip updating the index.
Select CPAN mirror to download from.
Number of seconds to delay between retry attempt.
Number of retry attempts on failed HTTP request.
Specify a file pattern to skip from being indexed.
Skip one or more file patterns from being indexed (JSON-encoded).
See --skip-index-file-pattern.
--skip-index-file-pattern
Skip a file from being indexed.
Skip one or more files from being indexed (JSON-encoded).
See --skip-index-file.
--skip-index-file
Specify a file pattern to skip being parsed for subs.
Skip one or more file patterns from being parsed for subs (JSON-encoded).
See --skip-sub-indexing-file-pattern.
--skip-sub-indexing-file-pattern
Skip a file from being parsed for subs.
Skip one or more files from being parsed for subs (JSON-encoded).
See --skip-sub-indexing-file.
--skip-sub-indexing-file
Alias for --skip-index-file.
My author ID.
If specified, will show additional added/updated items for this author ID ("you"), e.g. what distributions recently added dependency to one of your modules.
This script has shell tab completion capability with support for several shells.
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.
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).
For fish and zsh, install shcompgen as described above.
By default CPAN mirror is put in ~/cpan. To customize this, use the --cpan option, e.g.:
--cpan
% 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:
~/lcpan.conf
cpan=/path/to/my/cpan
By default at $cpan/index.db. You can customize the name of the database using the --index-name command-line option or the Cindex_name> configuration, e.g.:
$cpan/index.db
--index-name
--index-name lcpan.db
which will create the database at $cpan/lcpan.db. If you want to put the database file somewhere else (e.g. outside the CPAN repository structure), prepend a path (something that contains "/") to the index name, e.g. in configuration:
$cpan/lcpan.db
index_name = /home/ujang/lcpan.db
You can try using Log::ger::DBI::Query, e.g.:
% PERL5OPT=-MLog::ger::DBI::Query TRACE=1 lcpan ...
Run lcpan reset (or delete index.db) and run lcpan update --noupdate-files again.
lcpan reset
lcpan update --noupdate-files
This 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:
--debug
-F
lcpan.conf
[update] skip_index_files=The-Culprit-1.23.tar.gz
Add more of such lines if you want to skip more files.
Run lcpan update --noupdate-index.
lcpan update --noupdate-index
Use lcpan stats or lcpan stats-last-index-time.
lcpan stats
lcpan stats-last-index-time
Yes. You can use lcpan to index any CPAN-like repository. This include a mini CPAN mirror, a mini CPAN mirror with a few injected private modules, or a repository created by OrePAN (or similar tools).
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): /home/u1/.config/lcpan.conf, /home/u1/lcpan.conf, or /etc/lcpan.conf.
--config-path
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].
[subcommand=NAME]
[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.
[profile=SOMENAME]
[SOMESECTION profile=SOMENAME]
[subcommand=SUBCOMMAND_NAME profile=SOMENAME]
[SOMESECTION subcommand=SUBCOMMAND_NAME profile=SOMENAME]
--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.
program=NAME
[program=NAME ...]
[SOMESECTION program=NAME]
You can also 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 equals some string: [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 some string: [env=HOSTNAME!=blink ...] or [SOMESECTION env=HOSTNAME!=blink ...]. If you only want a section to be read when the value of an environment variable includes some string: [env=HOSTNAME*=server ...] or [SOMESECTION env=HOSTNAME*=server ...]. If you only want a section to be read when the value of an environment variable does not include some string: [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.
env=CONDITION
[env=SOMEVAR ...]
[SOMESECTION env=SOMEVAR ...]
[env=HOSTNAME=blink ...]
[SOMESECTION env=HOSTNAME=blink ...]
[env=HOSTNAME!=blink ...]
[SOMESECTION env=HOSTNAME!=blink ...]
[env=HOSTNAME*=server ...]
[SOMESECTION env=HOSTNAME*=server ...]
[env=HOSTNAME!*=server ...]
[SOMESECTION env=HOSTNAME!*=server ...]
To load and configure plugins, you can use either the -plugins parameter (e.g. -plugins=DumpArgs or -plugins=DumpArgs@before_validate_args), or use the [plugin=NAME ...] sections, for example:
-plugins
-plugins=DumpArgs
-plugins=DumpArgs@before_validate_args
[plugin=NAME ...]
[plugin=DumpArgs] -event=before_validate_args -prio=99 [plugin=Foo] -event=after_validate_args arg1=val1 arg2=val2
which is equivalent to setting -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2.
-plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2
List of available configuration parameters:
cpan (see --cpan) format (see --format) index_name (see --index-name) log_level (see --log-level) naked_res (see --naked-res) update_db_schema (see --no-update-db-schema) use_bootstrap (see --no-use-bootstrap)
author (see --author)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) author (see --author) dont_uniquify (see --dont-uniquify) flatten (see --flatten) include_core (see --exclude-core) include_indexed (see --exclude-indexed) include_noncore (see --exclude-noncore) include_unindexed (see --exclude-unindexed) 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) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates) with_xs_or_pp (see --with-xs-or-pp)
author (see --author-arg) authors (see --author) authors_arent (see --author-isnt) include_core (see --exclude-core) include_noncore (see --exclude-noncore) module_authors (see --module-author) module_authors_arent (see --module-author-isnt) perl_version (see --perl-version) phase (see --phase) rel (see --rel)
author (see --author) detail (see --detail) latest (see --latest)
author (see --author) detail (see --detail)
added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) author (see --author) phase (see --phase) rel (see --rel) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates) user_authors (see --user-author) user_authors_arent (see --user-author-isnt)
author (see --author) detail (see --detail) full_path (see --full-path) latest (see --latest) random (see --random) sort (see --sort)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) detail (see --detail) or (see --or) query (see --query) query_type (see --query-type) random (see --random) result_limit (see --result-limit) result_start (see --result-start) sort (see --sort)
count_per (see --count-per) include_self_mentions (see --include-self-mentions)
exclude_same_author (see --exclude-same-author) phase (see --phase) rel (see --rel)
module_or_dist_or_script (see --module-or-dist-or-script)
author (see --author) detail (see --detail) dist (see --dist) file_id (see --file-id) or (see --or) package (see --package) query (see --query) query_type (see --query-type)
module (see --module) overwrite (see --overwrite)
overwrite (see --overwrite) release (see --release)
all (see --all) overwrite (see --overwrite) script (see --script)
delete_file (see --delete-file) release (see --release)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) dists (see --dist) dont_uniquify (see --dont-uniquify) exclude_deps (see --exclude-dep) flatten (see --flatten) include_core (see --exclude-core) include_indexed (see --exclude-indexed) include_noncore (see --exclude-noncore) include_unindexed (see --exclude-unindexed) level (see --level) modules (see --module) perl_version (see --perl-version) phase (see --phase) rel (see --rel) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates) with_xs_or_pp (see --with-xs-or-pp)
authors (see --author) authors_arent (see --author-isnt) include_core (see --exclude-core) include_noncore (see --exclude-noncore) modules (see --module) perl_version (see --perl-version) phase (see --phase) rel (see --rel)
dist (see --dist)
author (see --author) detail (see --detail) dist (see --dist) file_id (see --file-id) or (see --or) package (see --package)
detail (see --detail) dist (see --dist)
dist (see --dist) level (see --level) phase (see --phase) rel (see --rel)
detail (see --detail) dists (see --dist)
dists (see --dist)
dist (see --dist) full_path (see --full-path)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) 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) random (see --random) rel_mtime_newer_than (see --rel-mtime-newer-than) result_limit (see --result-limit) result_start (see --result-start) sort (see --sort) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates)
author (see --author) n (see -n) phase (see --phase) rel (see --rel)
author (see --author) n (see -n)
format (see --format-arg) name (see --name) script (see --script)
module (see --module)
release (see --release)
all (see --all) script (see --script)
author (see --author) files (see --file)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) 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) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) mentioned_authors (see --mentioned-author) mentioned_modules (see --mentioned-module) mentioned_scripts (see --mentioned-script) modules (see --module) type (see --type) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) mentioned_authors (see --mentioned-author) mentioned_modules (see --mentioned-module) mentioned_scripts (see --mentioned-script) scripts (see --script) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) 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) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) 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) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates)
author (see --author) detail (see --detail) file_id (see --file-id) module (see --module) or (see --or) package (see --package)
modules (see --module)
full_path (see --full-path) module (see --module)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) author (see --author) detail (see --detail) dist (see --dist) include_core (see --exclude-core) include_noncore (see --exclude-noncore) latest (see --latest) namespaces (see --namespace) or (see --or) perl_version (see --perl-version) query (see --query) query_type (see --query-type) random (see --random) result_limit (see --result-limit) result_start (see --result-start) sort (see --sort) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates)
count_per (see --count-per) include_self_mentions (see --include-self-mentions) n (see -n)
n (see -n) phase (see --phase) rel (see --rel)
dist_authors (see --dist-author) dist_authors_arent (see --dist-author-isnt) module_authors (see --module-author) module_authors_arent (see --module-author-isnt) n (see -n) phase (see --phase) rel (see --rel)
detail (see --detail) latest (see --latest) modules (see --module)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) 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) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) authors (see --author) authors_arent (see --author-isnt) dists (see --dist) dont_uniquify (see --dont-uniquify) flatten (see --flatten) level (see --level) modules (see --module) phase (see --phase) rel (see --rel) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates)
author (see --author) level (see --level) modules (see --module) phase (see --phase) rel (see --rel)
authors (see --author) limit (see --limit) sort (see --sort) with_scores (see --with-scores)
limit (see --limit) modules (see --module) skip_same_dist (see --skip-same-dist) sort (see --sort) submodules (see --submodules) with_content_paths (see --with-content-paths) with_scores (see --with-scores)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) added_since (see --added-since) added_since_last_index_update (see --added-since-last-index-update) added_since_last_n_index_updates (see --added-since-last-n-index-updates) 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) random (see --random) result_limit (see --result-limit) result_start (see --result-start) sort (see --sort) updated_since (see --updated-since) updated_since_last_index_update (see --updated-since-last-index-update) updated_since_last_n_index_updates (see --updated-since-last-n-index-updates)
script (see --script)
all (see --all) scripts (see --script)
all (see --all) full_path (see --full-path) scripts (see --script)
author (see --author) detail (see --detail) dist (see --dist) or (see --or) query (see --query) query_type (see --query-type)
detail (see --detail) latest (see --latest) scripts (see --script)
name (see --name) script (see --script)
authors (see --author) detail (see --detail) or (see --or) packages (see --package) query (see --query) query_type (see --query-type) random (see --random) sort (see --sort)
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) retry_delay (see --retry-delay) retry_max_attempts (see --retry-max-attempts) 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_file_patterns (see --skip-index-file-pattern) skip_index_files (see --skip-index-file) skip_sub_indexing (see --no-skip-sub-indexing) skip_sub_indexing_file_patterns (see --skip-sub-indexing-file-pattern) skip_sub_indexing_files (see --skip-sub-indexing-file) update_files (see --no-update-files) update_index (see --no-update-index)
added_or_updated_since (see --added-or-updated-since) added_or_updated_since_last_index_update (see --added-or-updated-since-last-index-update) added_or_updated_since_last_n_index_updates (see --added-or-updated-since-last-n-index-updates) my_author (see --my-author)
detail (see --detail) module (see --module)
String. Specify additional command-line options.
% lcpan authors
% lcpan authors MICHAEL% ERROR MICHAEL: MICHAELW
% lcpan changes Data::CSel::Parser
% lcpan deps Module-List
% lcpan deps Module::List
% lcpan deps --module Sah::Schema::filename
Sah::Schema::filename is included in Sah-Schemas-Path distribution, so this command is equivalent to "lcpan deps Sah-Schemas-Path". You can't do "lcpan deps Sah::Schema::filename" because lcpan will assume that you ask "lcpan deps Sah-Schema-filename" and there is no Sah-Schema-filename distribution.
% lcpan deps Module-List --exclude-core
% lcpan deps Module-List@0.004
% lcpan dists --cpan /cpan
% lcpan dists --cpan /cpan --latest
% lcpan dists --cpan /cpan data-table
% lcpan dists --cpan /cpan --author perlancar --json
% lcpan doc Rinci
% lcpan doc Rinci.pm
% lcpan doc Rinci.pod
% lcpan doc -s strict
% lcpan doc --raw Text::Table::Tiny
% lcpan rdeps Sah::Schema::filename
% lcpan rdeps --dist Sah-Schemas-Path
Please visit the project's homepage at https://metacpan.org/release/App-lcpan.
Source repository is at https://github.com/perlancar/perl-App-lcpan.
App::lcpan::Manual
cpan-outdated
perlancar <perlancar@cpan.org>
To contribute, you can send patches by email/via RT, or send pull requests on GitHub.
Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond that are considered a bug and can be reported to me.
This software is copyright (c) 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015 by perlancar <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.
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.
To install App::lcpan, copy and paste the appropriate command in to your terminal.
cpanm App::lcpan
CPAN shell
perl -MCPAN -e shell install App::lcpan
For more information on module installation, please visit the detailed CPAN module installation guide.