cpan - getting module dependencies from a perl distribution file? -
given perl distribution file, e.g. file archive-zip-1.30.tar.gz, modern way determine prerequisites (i.e. other perl modules) distribution needs?
i imagine procedure goes like:
- unpack archive
- if
makefile.plfile found, ... - if
build.plfile found, ...
or maybe there's module?
i should add i'm interested in perl code list dependencies.
update: guess answer @ meta.json or meta.yml file should included in every dist file.
update2: not every dist file has meta file. see answer below how generate them.
if in situation need think module's dependencies, meta may not enough. in experience, need know entire dependency graph useful. i'm not aware of separate tool recursively analyze module dependencies, although might find 1 on cpan , cook yourself.
dependency information can found through metacpan api, that's way data without having fetch modules cpan , @ meta files.
if build dependency graph based on "latest" modules cpan, beware may change on time, because new releases cpan can change dependencies @ time.
for more visual answer, create free account on stratopan.com , pull archive-zip-1.30.tar.gz repository there. @ graphs produces of dependencies. this example of such graphs. [disclaimer: operate stratopan.com]
Comments
Post a Comment