Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Listing bundle contents and dependencies

by martin (Friar)
on Nov 08, 2017 at 17:03 UTC ( #1202964=perlquestion: print w/replies, xml ) Need Help??
martin has asked for the wisdom of the Perl Monks concerning the following question:

Dear fellow monks,

I'd like to list all direct and indirect dependencies of a CPAN module or bundle without actually installing any of those. For example, I'd like to know what precisely would be installed with Bundle::Math, a bundle of bundles of modules with countless prerequisites.

CPAN::FindDependencies seems to ignore the contents of Bundles. The dependency graphs of seem to ignore module dependencies from "dynamic" configurations, as does MetaCPAN::API.

Another idea I had is running cpan/cpanp/cpanm against a throw-away install directory and analysing the log output. As a bonus, this would let me choose whether I want to include recommended modules and build-time dependencies. However, it is not automated.

Similarly, a whole throw-away perl instance could be compared on the file level before and after an installation. This would be time-consuming. It might be desirable to run this as a smoke test service and collect the results in a database.

Has somebody done similar work? Are there other tools I should try?

  • Comment on Listing bundle contents and dependencies

Replies are listed 'Best First'.
Re: Listing bundle contents and dependencies
by Anonymous Monk on Nov 08, 2017 at 19:33 UTC
    You could use local::lib to install the target bundle to an empty directory, and then see what else ends up installed in there. Depending on how deep into this you want to go you may end up wanting to test for different versions of Perl using perlbrew. If you want to create a database you could set up a pinto server. For diffing the before-and-after of a directory, I think local::lib will be easiest - but you could always do a `git init; git add .; git commit -m 'init'` beforehand, do the install, then check `git status` afterwards.
Re: Listing bundle contents and dependencies
by beech (Vicar) on Nov 09, 2017 at 10:18 UTC


    Bundles are simple to parse :)

    It is kind of funny metacpan/CPANdeps don't deal with Bundles

      BTW #1, is there a spec for Bundle somewhere?

      BTW #2, counting from my local CPAN mirror, there are currently 183 Task:: modules while there are 268 Bundle:: modules. I think overall Task:: is better and we should encourage people making a Task:: distribution instead of bundles.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1202964]
Approved by herveus
Front-paged by haukex
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2018-07-23 02:32 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (459 votes). Check out past polls.