1CPAN::FindDependencies(U3s)er Contributed Perl DocumentatCiPoAnN::FindDependencies(3)
2
3
4

NAME

6       CPAN::FindDependencies - find dependencies for modules on the CPAN
7

SYNOPSIS

9           use CPAN::FindDependencies;
10           my @dependencies = CPAN::FindDependencies::finddeps("CPAN");
11           foreach my $dep (@dependencies) {
12               print ' ' x $dep->depth();
13               print $dep->name().' ('.$dep->distribution().")\n";
14           }
15

HOW IT WORKS

17       The module uses the CPAN packages index to map modules to distributions
18       and vice versa, and then fetches distributions' META.yml or Makefile.PL
19       files from "http://metacpan.org/" to determine pre-requisites.  This
20       means that a working interwebnet connection is required.
21

FUNCTIONS

23       There is just one function, which is not exported by default although
24       you can make that happen in the usual fashion.
25
26   finddeps
27       Takes a single compulsory parameter, the name of a module (ie
28       Some::Module); and the following optional named parameters:
29
30       nowarnings
31           Warnings about modules where we can't find their META.yml or
32           Makefile.PL, and so can't divine their pre-requisites, will be
33           suppressed;
34
35       fatalerrors
36           Failure to get a module's dependencies will be a fatal error
37           instead of merely emitting a warning;
38
39       perl
40           Use this version of perl to figure out what's in core.  If not
41           specified, it defaults to 5.005.  Three part version numbers (eg
42           5.8.8) are supported but discouraged.
43
44       02packages
45           The location of CPAN.pm's "02packages.details.txt.gz" file as a
46           local filename, with either a relative or an absolute path.  If not
47           specified, it is fetched from a CPAN mirror instead.  The file is
48           fetched just once.
49
50       cachedir
51           A directory to use for caching.  It defaults to no caching.  Even
52           if caching is turned on, this is only for META.yml or Makefile.PL
53           files.  02packages is not cached - if you want to read that from a
54           local disk, see the "02packages" option.
55
56       maxdepth
57           Cuts off the dependency tree at the specified depth.  Your
58           specified module is at depth 0, your dependencies at depth 1, their
59           dependencies at depth 2, and so on.
60
61       usemakefilepl
62           If set to true, then for any module that doesn't have a META.yml,
63           try to use its Makefile.PL as well.  Note that this involves
64           downloading code from the Internet and running it.  This obviously
65           opens you up to all kinds of bad juju, hence why it is disabled by
66           default.
67
68       recommended
69           Adds recommended modules to the list of dependencies, if set to a
70           true value.
71
72       configreqs
73            Adds modules required for configuration (the 'configure_requires' list in yaml) to the list of dependencies, if set to a true value.
74
75       It returns a list of CPAN::FindDependencies::Dependency objects, whose
76       useful methods are:
77
78       name
79           The module's name;
80
81       distribution
82           The distribution containing this module;
83
84       version
85           The minimum required version of his module (if specified in the
86           requirer's pre-requisites list);
87
88       depth
89           How deep in the dependency tree this module is;
90
91       warning
92           If any warning was generated (even if suppressed) for the module,
93           it will be recorded here.
94
95       Any modules listed as dependencies but which are in the perl core
96       distribution for the version of perl you specified are suppressed.
97
98       These objects are returned in a semi-defined order.  You can be sure
99       that a module will be immediately followed by one of its dependencies,
100       then that dependency's dependencies, and so on, followed by the 'root'
101       module's next dependency, and so on.  You can reconstruct the tree by
102       paying attention to the depth of each object.
103
104       The ordering of any particular module's immediate 'children' can be
105       assumed to be random - it's actually hash key order.
106

SECURITY

108       If you set "usemakefilepl" to a true value, this module may download
109       code from the internet and execute it.  You should think carefully
110       before enabling that feature.
111

BUGS/WARNINGS/LIMITATIONS

113       You must have web access to <http://metacpan.org/> and (unless you tell
114       it where else to look for the index) <http://www.cpan.org/>, or have
115       all the data cached locally..  If any META.yml or Makefile.PL files are
116       missing, the distribution's dependencies will not be found and a
117       warning will be spat out.
118
119       Startup can be slow, especially if it needs to fetch the index from the
120       interweb.
121

FEEDBACK

123       I welcome feedback about my code, including constructive criticism and
124       bug reports.  The best bug reports include files that I can add to the
125       test suite, which fail with the current code in my git repo and will
126       pass once I've fixed the bug
127
128       Feature requests are far more likely to get implemented if you submit a
129       patch yourself.
130

SOURCE CODE REPOSITORY

132       <git://github.com/DrHyde/perl-modules-CPAN-FindDependencies.git>
133

SEE ALSO

135       CPAN
136
137       <http://deps.cpantesters.org/>
138
139       <http://metacpan.org>
140
142       Copyright 2007 - 2019 David Cantrell <david@cantrell.org.uk>
143
144       This software is free-as-in-speech software, and may be used,
145       distributed, and modified under the terms of either the GNU General
146       Public Licence version 2 or the Artistic Licence. It's up to you which
147       one you use. The full text of the licences can be found in the files
148       GPL2.txt and ARTISTIC.txt, respectively.
149

THANKS TO

151       Stephan Loyd (for fixing problems with some META.yml files)
152
153       Alexandr Ciornii (for a patch to stop it segfaulting on Windows)
154
155       Brian Phillips (for the code to report on required versions of modules)
156
157       Ian Tegebo (for the code to extract deps from Makefile.PL)
158
159       Georg Oechsler (for the code to also list 'recommended' modules)
160
161       Jonathan Stowe (for making it work through HTTP proxies)
162
163       Kenneth Olwing (for support for 'configure_requires')
164

CONSPIRACY

166       This module is also free-as-in-mason software.
167
168
169
170perl v5.30.1                      2020-01-29         CPAN::FindDependencies(3)
Impressum