Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

CPAN: Any way to (quickly) list all the dependency modules to download?

by sectokia (Pilgrim)
on Apr 22, 2022 at 09:38 UTC ( [id://11143196]=perlquestion: print w/replies, xml ) Need Help??

sectokia has asked for the wisdom of the Perl Monks concerning the following question:

I recently tried to install AnyEvent::Websocket::Server though CPAN and after hours it was still downloading and compiling modules.

Is there any way to know up front how many modules will be installed? It seems like it just blindy gets next one, and that one then needs 3 more, and so one and so on.

  • Comment on CPAN: Any way to (quickly) list all the dependency modules to download?

Replies are listed 'Best First'.
Re: CPAN: Any way to (quickly) list all the dependency modules to download?
by choroba (Cardinal) on Apr 22, 2022 at 09:50 UTC
Re: CPAN: Any way to (quickly) list all the dependency modules to download?
by haukex (Archbishop) on Apr 22, 2022 at 09:45 UTC

    Perhaps my script here can help? depend.pl

    It uses the MetaCPAN API, but AFAIK there are some modules that don't declare their dependencies statically, so you can't find out about those until you actually try to install the module.

Re: CPAN: Any way to (quickly) list all the dependency modules to download?
by marto (Cardinal) on Apr 22, 2022 at 10:15 UTC

    As a side note to what has already been mentioned, cpanm is faster than cpan, especially on systems with limited/slow resources (e.g. Raspberry Pi/embedded systems). The deprecated scandeps method may be of interest, but it isn't complete for reasons stated in existing responses:

    cpanm --scandeps AnyEvent::WebSocket::Server => Found dependencies: AnyEvent::Handle, AnyEvent::Socket AnyEvent-WebSocket-Server-0.10 \_ Test-Memory-Cycle-1.06 \_ Devel-Cycle-1.12 \_ PadWalker-2.5 \_ AnyEvent-WebSocket-Client-0.54 \_ Protocol-WebSocket-0.26 \_ PerlX-Maybe-1.202 \_ Canary-Stability-2013 \_ AnyEvent-7.17 \_ AnyEvent-Connector-0.03

    See also App::cpm.

Re: CPAN: Any way to (quickly) list all the dependency modules to download?
by syphilis (Archbishop) on Apr 22, 2022 at 11:18 UTC
    I recently tried to install AnyEvent::Websocket::Server though CPAN and after hours it was still downloading and compiling modules

    Heh ... did you then find that AnyEvent::Websocket::Server had, in fact, been installed christ-knows-how-many-modules-back ?
    That's the variant that really annoys me.

    It's happened to me a couple of times in the past - the last time being about 4 days ago (on MS Windows) wrt Math-Calc-Parser-1.005.
    I don't know if that was actually the fault of that module but I find it very annoying when it happens - especially when much of the supplementary stuff is (regarded by me as being) sanctimonious shit, as is usually the case.

    Update: Sorry for the rant at the end. Long dependency chains always irritate me more than they ought.

    Cheers,
    Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11143196]
Approved by Discipulus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 05:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found