in reply to howto install modules

Regarding the issue of Smart-Comments, the CPAN.pm shell reports

Module id = Smart::Comments CPAN_USERID AUTRIJUS (Autrijus Tang <autrijus@autrijus.org>) CPAN_VERSION 0.01 CPAN_FILE A/AU/AUTRIJUS/Smart-Comments-0.01.tar.gz INST_FILE (not installed)
which indicates that the CPAN/PAUSE indices associate Smart::Comments with Autrijus Tang (note - the reported CPAN_FILE isn't available on CPAN). Most likely the reason that DCONWAY/Smart-Comments-1.0.1.tar.gz isn't reported is that ownership of Smart::Comments hasn't been transferred to Damian Conway, or a co-ownership hasn't been established.

Within the CPAN/CPLANPLUS shells you can always specify a specific distribution to install:

cpan> install DCONWAY/Smart-Comments-1.0.1.tar.gz
if you want to do so for a version other than that that the CPAN/PAUSE indices associate a particular module with.

Replies are listed 'Best First'.
Re^2: howto install modules
by powerman (Friar) on Oct 10, 2005 at 23:27 UTC
    Thanks for example how to install Conway's version.

    But I still see a problem: it's not obvious way to install just last version of Smart::Comments - to use CPAN.pm this way I first should hit this issue and found author and last version for needed modules manually... this mean CPAN.pm doesn't work in right way and don't do it's primary task (automatically install needed module from CPAN). This mean CPAN.pm and CPANPLUS.pm are not reliable tools. :-(

    I just did some reasearch on this topic and found this:

    • module lists in /by-module/ and /by-authors/id/ differ:
      http://www.cpan.org/modules/by-authors/id/
      contain 26837 modules
      http://www.cpan.org/modules/by-module/
      contain 22012 modules
      plus there 680 modules in /by-module/ which isn't exists in /by-authors/id/!
    • interesting, by I don't found Smart::Comments neither on www.cpan.org in /A/AU/AUTRIJUS/ nor on first CPAN mirror I try (cpan.online.bg)! I wonder from where CPAN.pm downloaded it and found it use another mirror (http://no-more.kiev.ua/CPAN/) which contain a LOT of files which isn't exists on both previous sites (probably admin of this mirror forget to configure deletion of files).
    This in turn mean CPAN.pm not only try to install incorrect version, but also it found incorrectly configured mirror to download file deleted from main CPAN site... this sounds like sabotage! :-)))

    If we forget for a minute about differences between /by-module/ and /by-authors/id/ and decide what /id/ always contain mostly up-to-date modules, then why not just download listings of all subdirectories in /id/ to get correct and reliable list of modules? I've just did this: current size of all downloaded listings (in html) is 18MB, gzip'ed size is 1.2MB (I hope cpan.org's website has mod_gzip installed and all these listings was downloading gzip'ed). I don't see why CPAN.pm don't download these 1.2MB - it's not too much even on 33.6 Kbps modem! If cpan.org will run simple cron-script once per day which will prepare list of all modules in single .txt file, then this file size will be 900KB or even 167KB gzip'ed.

    So, you see, it isn't too complex to make this task reliable. And, you see, CPAN.pm and CPANPLUS.pm doesn't reliable tools. So, is there reliable tool for this task? Or we should reinvent this wheel one more time? :-(

      You're right that some mirrors contain more files than others, and it's probably a configuration issue; for rsync, for example, one would have to enable the --delete flag.

      It's important to distinguish the CPAN.pm/CPANPLUS.pm tools from the CPAN/PAUSE indices living under $CPAN/authors/ and $CPAN/modules/; the tools are just following what's in the indices, and so aren't "broken" in this respect. As you say, it would be possible to go through all distributions on CPAN, extract out the included modules, and make up a set of indices containing the latest versions, irrespective of who the owner is according to the CPAN/PAUSE indices (search.cpan.org does this, to an extent). However, using such a set of indices to install a module with CPAN/CPANPLUS would break the fundamental assumption of unique module names, and would lead to a situation whereby, for example, one author can overwrite another author's module just by uploading a later version to CPAN. There are plans in perl6 to address this - see, for example, CPAN, Perl6, and module versioning - but for now, module ownership/co-ownership is a safeguard put in place to prevent such a situation.

        Thanks again, excelent explanation.

        But I don't see relation between these two tasks: assurance in unique module names and access to modules. For example, search.cpan.org use different way for accessing modules because it doesn't show Smart::Comment on http://search.cpan.org/~autrijus/ (there no 0.01 version of Smart::Comments on search.cpan.org at all) but show all Conway's versions.

        Anyway, thanks again for your answers. Situation is now clear for me: problem with Smart::Comments and CPAN.pm has deep roots in CPAN architecture which nobody will try to fix until Perl6. :) It's easy to workaround this issue by using manually prepared module list from CPAN's directory listings, but this may result in some other unusual bugs.