App-lcpan

 view release on metacpan or  search on metacpan

script/lcpan  view on Meta::CPAN


B<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?

B<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?

B<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
C<App::lcpan::CmdBundle::*> modules for more subcommands.

See L<App::lcpan::Manual> for more tips, cookcooks, tutorials.

=head2 Injecting 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 (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 C<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.

=head1 DESCRIPTION

This application is a convenient bundling of C<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 C<lcpan> is created.

=head1 MORE EXAMPLE QUERIES AND COMMANDS FOR CPAN USERS

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

TODO

=head2 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

=head2 Update all modules on your system, from local CPAN mirror

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

=head1 MORE EXAMPLE QUERIES AND COMMANDS FOR CPAN AUTHORS

=head2 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



( run in 1.914 second using v1.01-cache-2.11-cpan-39bf76dae61 )