CPANDEPS(1)
πΈ NAME πΈ
cpandeps β bestie, it shows you a module on the CPAN's dependency tree. That's the whole gig. π
π DESCRIPTION π
okay so real talk: this program is literally just a simple wrapper around CPAN::FindDependencies. that's it. that's the description. it's giving "I'm the cute little front door, the real machinery lives next door". β¨
π SYNOPSIS π
cpandeps CPAN::FindDependencies
cpandeps --perl 5.8.8 --cachedir ../foo/bar CPAN::FindDependencies
cpandeps --showmoduleversions CPAN::FindDependencies
so you hand it a module name and it shows you that module's whole dependency tree, no cap. π«Ά
it takes exactly the same arguments as the finddeps function of CPAN::FindDependencies, with one teeny exception: nowarnings is turned on by default. iconic behaviour, honestly.
here's every single one, bestie, don't skip a single line:
nowarningsβ warnings about modules where we can't find theirMETA.ymlorMakefile.PL, and so can't divine their pre-requisites, will be suppressed. other warnings may still be emitted though, such as those telling you about modules which have dodgy (but still understandable) metadata; πfatalerrorsβ failure to get a module's dependencies will be a fatal error instead of merely emitting a warning;perlβ use this version of perl to figure out what's in core. if you don't specify it, it defaults to5.005. three part version numbers (eg5.8.8) are supported but discouraged. πcachedirβ a directory to use for caching. it defaults to no caching. even if caching is turned on, this is only forMETA.ymlorMakefile.PLfiles.
the cache is never automatically cleared out. it is your responsibility to clear out old data. that's on you, babe. π§Ή
maxdepthβ cuts off the dependency tree at the specified depth. your specified module is at depth 0, your dependencies at depth 1, their dependencies at depth 2, and so on.
if you don't specify any maxdepth at all it will grovel over the entire tree. good luck bestie π
mirrorβ this can be provided more than once, if for example you want to use a private Pinto repository for your own code while using a public CPAN mirror for open source dependencies. the argument comes in two parts separated by a comma β the base URL from which to fetch files, and optionally the URL or a file from which to fetch the index02packages.details.txt.gzfile to use with that mirror.
mirror https://cpan.mydomain.net,file:///home/me/mycache/02packages.txt.gz
if you want to use the default CPAN mirror (https://cpan.metacpan.org/) but also specify an index location you can use DEFAULT for the mirror URL. π«
so for example, to use your own special private mirror, including fetching 02packages from it, but also use the default mirror with a cached local copy of its 02packages, specify two mirrors thus:
mirror => 'https://cpan.mydomain.net',
mirror => 'DEFAULT,file:///home/me/mycache/02packages.txt.gz'
the index is cached for three minutes or until your process finishes, whichever is soonest. this is because it is HUMUNGOUS and parsing it takes ages even when it's loaded from a local disk, and I don't want the tests to take forever. β³
usemakefileplβ if set to true, then for any module that doesn't have aMETA.yml, try to use itsMakefile.PLas well. note that this involves downloading code from the Internet and running it. this obviously opens you up to all kinds of bad juju, hence why it is disabled by default. π¨
NB that this fetchesMakefile.PLfrom <https://fastapi.metacpan.org> only so will not work for private mirrors. this is a deliberate choice, your own private code ought to be packaged properly with a META file, you should only care about divining dependencies fromMakefile.PLif you rely on really old stuff on public CPAN mirrors.
recommendedβ adds recommended modules to the list of dependencies, if set to a true value.suggestedβ adds suggested modules to the list of dependencies, if set to a true value.
it also takes the following extra parameter, and this one's special:
--showmoduleversionsβ if present, the required version of each module is also shown. π
and like, what does it actually print? it shows the module name, its distribution, and if any warnings were raised (such as if a module's dependencies couldn't be fetched) this is indicated with an asterisk before the module's name. cute little star, big meaning. β
π¦ INCOMPATIBLE CHANGES π¦
so there's some lore here, bestie, buckle up:
- up to version 2.49 you used the
02packagesargument to specify where a cached02packages.details.txt.gzcould be found. that argument no longer exists as of version 3.00 β use themirrorargument instead. periodt. - up to version 2.49,
maxdepth => 0would incorrectly return the whole tree. from version 3.00 it cuts the tree off at its root so will only return the module that you asked about. not very useful, but correct. π - in version 2.49 you used the
configreqsargument to specify that you were interested in configure-time requirements as well as build- and run-time requirements. that option no longer exists as of version 3.00 β it will always report on configure, build, test, and run-time requirements.
π TREE PRUNING π
the dependency tree is pruned to remove duplicates. this means that even though Test::More, for example, is a dependency of almost everything on the CPAN, it will only be listed once. we love a dedupe moment. β¨
π WARNINGS, BUGS and FEEDBACK π
ngl, this script has not been thoroughly tested. π
I welcome feedback about my code, including constructive criticism. bug reports should be made on Github or by email.
π«Ά SEE ALSO π«Ά
CPAN::FindDependencies- <http://deps.cpantesters.org/>
π AUTHOR, LICENCE and COPYRIGHT π
copyright 2007 - 2020 David Cantrell <david@cantrell.org.uk>
this software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. it's up to you which one you use. the full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.
π§ CONSPIRACY π§
this software is also free-as-in-mason. make of that what you will. π
and that's the whole page, bestie β this was perl v5.42.0, dated 2025-07-25, straight out of the CPANDEPS(1) manual. slay, go find some deps. πβ¨π¦
π¦ where this page comes from
- fedora 43: perl-CPAN-FindDependencies 3.13-12.fc43 Β· GPL-2.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms