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

Hi Monks,

What is the difference between cpan and metacpan and which do people prefer?

If I use cpan -i Wx on cpan do I need to use metacpan -i Wx on metacpan.

What are the advantages and disadvantages of each?

Your wisdom is appreciated.

Regards

Steve

Replies are listed 'Best First'.
What is CPAN? Re: cpan vs metacpan
by moritz (Cardinal) on Aug 26, 2011 at 16:54 UTC

    What is CPAN?

    CPAN = Comprehensive Perl Archive Network

    But that "word" is used in many contexts

    A module distribution infrastructure

    There's Perl Author's Upload Server for uploading modules, and lots of mirrors from which you can download modules.

    A website

    There are multiple websites that you can use when searching for perl modules, and when viewing documentation and of modules. Among the popular ones are http://search.cpan.org/, http://kobesearch.cpan.org/ and https://metacpan.org/. The latter also provides a rich HTTP-based API, which is very good for automating CPAN-related data analysis.

    Module Installers

    CPAN.pm comes with the cpan command line tool, CPANPLUS has cpanp, App::cpanminus ships with cpanm.

    Those clients need a CPAN mirror (either online or a local mirror). All of them work with any mirror, though cpanm talks to a "cpanmetadb" server (not the same as metacpan.org) to find distributions (but it can work offline with a local CPAN mirror too).


    My personal favorites are cpanm (because it works so well, and doesn't produce loads of output that bores me), and search.cpan.org and metacpan.org as web interfaces.

      Hi Moritz,

      Thanks for that. So if something is on one of the search engines (eg cpan) in version 0.19, then it will the same version everywhere because they all use the same upload server and mirrors. Is that correct?

      Regards

      Steve

        Yes, that is correct, though of course the search indexes on the various websites aren't updated immediately (but in batches), so if usually takes a few hours for a new release to show up on search.cpan.org. I'm not sure about the time delays of the other sites, but I'd guess they won't lag behind more than a day.