CPANPLUS(3pm)
π CPANPLUS π
okay bestie, listen. this is the manual page for CPANPLUS (3pm), which lives in the User Contributed Perl Documentation corner of your system, and it is literally your backstage pass to the CPAN mirrors. buckle up. π
β¨ NAME β¨
CPANPLUS β API & CLI access to the CPAN mirrors
πΈ SYNOPSIS πΈ
here's the vibe, in code, because we are not paraphrasing code in this house:
### standard invocation from the command line
$ cpanp
$ cpanp -i Some::Module
$ perl -MCPANPLUS -eshell
$ perl -MCPANPLUS -e'fetch Some::Module'
π¦ DESCRIPTION π¦
so the CPANPLUS library is an API to the CPAN mirrors, and also a whole little collection of interactive shells, commandline programs, etc, that all use that API. it's giving platform. it's giving ecosystem. π
π GUIDE TO DOCUMENTATION π
π GENERAL USAGE
this is the doc you're reading right now, bestie, meta moment. it covers basic usage and background info. its main character purpose? helping you learn how to invoke CPANPLUS and install modules from the commandline, and pointing you toward the more in-depth reading if you need it. π«Ά
π§ API REFERENCE
the CPANPLUS API is here so you can programmatically interact with the CPAN mirrors. the docs in CPANPLUS::Backend show you how to create an object that can interact with those mirrors, letting you create & retrieve module objects. CPANPLUS::Module shows you how to use those module objects to do actions like installing and testing. iconic behaviour.
the default shell, documented in CPANPLUS::Shell::Default, is also scriptable. you can use its API to dispatch calls from your script to the CPANPLUS Shell. no cap.
π COMMANDLINE TOOLS π
π STARTING AN INTERACTIVE SHELL
you can start an interactive shell by running either of these two commands:
$ cpanp
$ perl -MCPANPLUS -eshell
all the commands available are listed in the interactive shells help menu. for instructions on using the default shell, see "cpanp -h" or CPANPLUS::Shell::Default. β¨
π CHOOSE A SHELL
run "cpanp" with no arguments and you'll start up the shell specified in your config, which defaults to CPANPLUS::Shell::Default. there are more shells available, because of course there are. "CPANPLUS" itself ships with an emulation shell called CPANPLUS::Shell::Classic that looks and feels just like the old "CPAN.pm" shell. nostalgia core.
you can start this shell by typing:
$ perl -MCPANPLUS -e'shell Classic'
even more shells may be available from "CPAN". the pipeline never ends, we love to see it.
heads up though: if you've changed your default shell in your configuration, that shell gets used instead. and if for some reason there was an error with your specified shell, you'll be given the default shell. the fallback is real. π
π BUILDING PACKAGES
"cpan2dist" is a commandline tool that converts any distribution from "CPAN" into a package in the format of your choice β like for example .deb or FreeBSD ports. packaging slay.
see "cpan2dist -h" for details. π₯
β FUNCTIONS β
for quick access to common commands, you may use this module, "CPANPLUS", rather than the full programmatic API situated in "CPANPLUS::Backend". this module offers the following functions:
π« $bool = install( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz )
this function requires the full name of the module, which is case sensitive. the module name can also be provided as a fully qualified file name, beginning with a /, relative to the /authors/id directory on a CPAN mirror.
it will download, extract and install the module. the whole trilogy. π
π« $where = fetch( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz )
like install, fetch needs the full name of a module or the fully qualified file name, and is case sensitive.
it will download the specified module to the current directory. π«Ά
π« $where = get( Module::Name | /A/AU/AUTHOR/Module-Name-1.tgz )
get is provided as an alias for fetch, for compatibility with CPAN.pm. legacy support bestie, we respect the elders.
π« shell()
shell starts the default CPAN shell. you can also start the shell by using the "cpanp" command, which will be installed in your perl bin. β¨
πΈ FAQ πΈ
for frequently asked questions and answers, please consult the "CPANPLUS::FAQ" manual. iykyk.
π BUG REPORTS π
please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>. tell them everything, they want to know. π
π AUTHOR π
this module by Jos Boumans <kane@cpan.org>. king behaviour, honestly.
π COPYRIGHT π
the CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. all rights reserved.
this library is free software; you may redistribute and/or modify it under the same terms as Perl itself.
π¦ SEE ALSO π¦
CPANPLUS::Shell::DefaultCPANPLUS::FAQCPANPLUS::BackendCPANPLUS::Modulecpanpcpan2dist
π CONTACT INFORMATION π
- bug reporting:
bug-cpanplus@rt.cpan.org - questions & suggestions:
bug-cpanplus@rt.cpan.org
and that's the whole page, bestie!! this was generated by perl v5.40.1 and dated 2025-03-01, so if you're reading this on some ancient perl, no judgement, just noting the lore. go install something cute. periodt. π β¨π
π¦ where this page comes from
- debian trixie: libcpanplus-perl 0.9916-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcpanplus-perl 0.9916-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcpanplus-perl 0.9916-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms